diff options
author | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-05-29 03:00:13 +0000 |
---|---|---|
committer | Niall O'Higgins <niallo@cvs.openbsd.org> | 2006-05-29 03:00:13 +0000 |
commit | 6dd1665eb2eeed229abfaca60efca2b71079d62c (patch) | |
tree | 347e1ef9c8c85978a736c4c3e087cb8df36046da /usr.bin | |
parent | adb13040e7cce0739a871f2bc4fa441ea2bb0375 (diff) |
- sizeof(struct tm) -> sizeof(*tb)
little tidbit from the flight to c2k6
ok joris@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rcs/rcstime.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 <joris@openbsd.org> * 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)) |