diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-09 19:10:49 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-09 19:10:49 +0100 |
commit | dc698bb038756a926aaa529bda1b939eab2c1676 (patch) | |
tree | 4084a40897d9d81816228935a1398e80dd4b173b /libbb/rtc.c | |
parent | 0681137972dc89b5003b0415e09184c0ecf1c875 (diff) | |
download | busybox-w32-dc698bb038756a926aaa529bda1b939eab2c1676.tar.gz busybox-w32-dc698bb038756a926aaa529bda1b939eab2c1676.tar.bz2 busybox-w32-dc698bb038756a926aaa529bda1b939eab2c1676.zip |
*: make it easier to distinquish "struct tm", pointer to one, etc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/rtc.c')
-rw-r--r-- | libbb/rtc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libbb/rtc.c b/libbb/rtc.c index 9807e1cf9..fcd6c64d7 100644 --- a/libbb/rtc.c +++ b/libbb/rtc.c | |||
@@ -59,14 +59,14 @@ int FAST_FUNC rtc_xopen(const char **default_rtc, int flags) | |||
59 | return xopen(*default_rtc, flags); | 59 | return xopen(*default_rtc, flags); |
60 | } | 60 | } |
61 | 61 | ||
62 | void FAST_FUNC rtc_read_tm(struct tm *tm, int fd) | 62 | void FAST_FUNC rtc_read_tm(struct tm *ptm, int fd) |
63 | { | 63 | { |
64 | memset(tm, 0, sizeof(*tm)); | 64 | memset(ptm, 0, sizeof(*ptm)); |
65 | xioctl(fd, RTC_RD_TIME, tm); | 65 | xioctl(fd, RTC_RD_TIME, ptm); |
66 | tm->tm_isdst = -1; /* "not known" */ | 66 | ptm->tm_isdst = -1; /* "not known" */ |
67 | } | 67 | } |
68 | 68 | ||
69 | time_t FAST_FUNC rtc_tm2time(struct tm *tm, int utc) | 69 | time_t FAST_FUNC rtc_tm2time(struct tm *ptm, int utc) |
70 | { | 70 | { |
71 | char *oldtz = oldtz; /* for compiler */ | 71 | char *oldtz = oldtz; /* for compiler */ |
72 | time_t t; | 72 | time_t t; |
@@ -77,7 +77,7 @@ time_t FAST_FUNC rtc_tm2time(struct tm *tm, int utc) | |||
77 | tzset(); | 77 | tzset(); |
78 | } | 78 | } |
79 | 79 | ||
80 | t = mktime(tm); | 80 | t = mktime(ptm); |
81 | 81 | ||
82 | if (utc) { | 82 | if (utc) { |
83 | unsetenv("TZ"); | 83 | unsetenv("TZ"); |