From 6dd1665eb2eeed229abfaca60efca2b71079d62c Mon Sep 17 00:00:00 2001 From: Niall O'Higgins Date: Mon, 29 May 2006 03:00:13 +0000 Subject: - sizeof(struct tm) -> sizeof(*tb) little tidbit from the flight to c2k6 ok joris@ --- usr.bin/rcs/rcstime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/rcs/rcstime.c b/usr.bin/rcs/rcstime.c index 4e070a3ec11..197c216e292 100644 --- a/usr.bin/rcs/rcstime.c +++ b/usr.bin/rcs/rcstime.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcstime.c,v 1.1 2006/04/26 02:55:13 joris Exp $ */ +/* $OpenBSD: rcstime.c,v 1.2 2006/05/29 03:00:12 niallo Exp $ */ /* * Copyright (c) 2006 Joris Vink * All rights reserved. @@ -41,7 +41,7 @@ rcs_set_tz(char *tz, struct rcs_delta *rdp, struct tm *tb) now = mktime(&rdp->rd_date); ltb = localtime(&now); ltb->tm_hour += ((int)ltb->tm_gmtoff/3600); - memcpy(tb, ltb, sizeof(struct tm)); + memcpy(tb, ltb, sizeof(*tb)); } else { pos = 0; switch (*tz) { @@ -58,7 +58,7 @@ rcs_set_tz(char *tz, struct rcs_delta *rdp, struct tm *tb) if ((m = strrchr(tz, ':')) != NULL) *(m++) = '\0'; - memcpy(tb, &rdp->rd_date, sizeof(struct tm)); + memcpy(tb, &rdp->rd_date, sizeof(*tb)); tzone = atoi(h); if ((tzone >= 24) && (tzone <= -24)) -- cgit v1.2.3