- don't free user-supplied string (via -e)
[oweals/busybox.git] / util-linux / hwclock.c
index b581d26048d65dc1ced869adb8e256c0f9eb7e47..3d28364e99bb4cc65ab0ed391359327f56edc98b 100644 (file)
@@ -8,7 +8,6 @@
 */
 
 #include <sys/utsname.h>
-#include <getopt.h>
 #include "libbb.h"
 #include "rtc_.h"
 
@@ -25,7 +24,7 @@ static time_t read_rtc(int utc)
        time_t ret;
        int fd;
 
-       fd = rtc_xopen(rtcname, O_RDONLY);
+       fd = rtc_xopen(&rtcname, O_RDONLY);
        ret = rtc_read_time(fd, utc);
        close(fd);
 
@@ -35,7 +34,7 @@ static time_t read_rtc(int utc)
 static void write_rtc(time_t t, int utc)
 {
        struct tm tm;
-       int rtc = rtc_xopen(rtcname, O_WRONLY);
+       int rtc = rtc_xopen(&rtcname, O_WRONLY);
 
        tm = *(utc ? gmtime(&t) : localtime(&t));
        tm.tm_isdst = 0;
@@ -91,7 +90,7 @@ static void from_sys_clock(int utc)
 #define HWCLOCK_OPT_RTCFILE     0x20
 
 int hwclock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int hwclock_main(int argc, char **argv)
+int hwclock_main(int argc UNUSED_PARAM, char **argv)
 {
        unsigned opt;
        int utc;