From: Sami Kerola Date: Sat, 16 Jul 2016 11:57:25 +0000 (+0100) Subject: hwclock: remove hwclock_exit() indirection X-Git-Tag: v2.30-rc1~267^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48e7ed5e3fec37307a3153b8082ca365083c68e7;p=thirdparty%2Futil-linux.git hwclock: remove hwclock_exit() indirection Reviewed-by: J William Piggott Signed-off-by: Sami Kerola --- diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c index 3cc425f9d4..10cb02a509 100644 --- a/sys-utils/hwclock.c +++ b/sys-utils/hwclock.c @@ -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: diff --git a/sys-utils/hwclock.h b/sys-utils/hwclock.h index 974d96a403..d58ebbc6f1 100644 --- a/sys-utils/hwclock.h +++ b/sys-utils/hwclock.h @@ -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 */