]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: remove hwclock_exit() indirection
authorSami Kerola <kerolasa@iki.fi>
Sat, 16 Jul 2016 11:57:25 +0000 (12:57 +0100)
committerSami Kerola <kerolasa@iki.fi>
Sat, 4 Feb 2017 23:39:36 +0000 (23:39 +0000)
Reviewed-by: J William Piggott <elseifthen@gmx.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/hwclock.c
sys-utils/hwclock.h

index 3cc425f9d413b68ad40409854918129c6e93f971..10cb02a50917e3b96180bb5c83d35684b6200508 100644 (file)
@@ -1912,22 +1912,18 @@ int main(int argc, char **argv)
        return rc;              /* Not reached */
 }
 
-#ifdef HAVE_LIBAUDIT
-/*
- * hwclock_exit calls either this function or plain exit depending
- * HAVE_LIBAUDIT see also clock.h
- */
-void __attribute__((__noreturn__)) hwaudit_exit(int status)
+void __attribute__((__noreturn__)) hwclock_exit(int status)
 {
+#ifdef HAVE_LIBAUDIT
        if (hwaudit_on) {
                audit_log_user_message(hwaudit_fd, AUDIT_USYS_CONFIG,
                                       "op=change-system-time", NULL, NULL, NULL,
                                       status ? 0 : 1);
                close(hwaudit_fd);
        }
+#endif
        exit(status);
 }
-#endif
 
 /*
  * History of this program:
index 974d96a40380188f486eeb40268f9d05e02a4b4d..d58ebbc6f1d090587c77e75832f47a010760f5ce 100644 (file)
@@ -35,11 +35,6 @@ extern int get_epoch_rtc(unsigned long *epoch, int silent);
 extern int set_epoch_rtc(unsigned long epoch);
 extern char *rtc_dev_name;
 
-#ifdef HAVE_LIBAUDIT
-extern void hwaudit_exit(int status);
-# define hwclock_exit(_status) hwaudit_exit(_status)
-#else
-# define hwclock_exit(_status) exit(_status)
-#endif
+extern void hwclock_exit(int status);
 
 #endif                         /* HWCLOCK_CLOCK_H */