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
From e05ee8f7a94431ac9a37a6c0f3b16e23783ca935 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Sat, 9 Jan 2016 12:33:31 -0800
Subject: [PATCH] hwclock cleanup.

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

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to