[Toybox] [PATCH] hwclock cleanup.

enh enh at google.com
Sat Jan 9 12:35:15 PST 2016


Fix a misspelled (and slightly technically inaccurate) comment, and fix an
accidental self-assignment.
---
 toys/other/hwclock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/toys/other/hwclock.c b/toys/other/hwclock.c
index 75e0641..6067a00 100644
--- a/toys/other/hwclock.c
+++ b/toys/other/hwclock.c
@@ -62,7 +62,7 @@ void hwclock_main()
   time_t time;
   int fd = -1;

-  // check for Grenich Mean Time
+  // Check for UTC.
   if (toys.optflags & FLAG_u) TT.utc = 1;
   else {
     FILE *fp;
@@ -86,7 +86,7 @@ void hwclock_main()

     // Get current time in seconds from rtc device. todo: get subsecond time
     if (!w) {
-      char *s = s;
+      char *s = 0;

       xioctl(fd, RTC_RD_TIME, &tm);
       if (TT.utc) s = xtzset("UTC0");
-- 
2.6.0.rc2.230.g3dd15c0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-hwclock-cleanup.patch
Type: text/x-patch
Size: 984 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20160109/53b86114/attachment-0002.bin>


More information about the Toybox mailing list