diff -ur watchdog-5.9.old/src/watchdog.c watchdog-5.9.cleanups/src/watchdog.c --- watchdog-5.9.old/src/watchdog.c 2010-06-16 14:45:51.000000000 +0100 +++ watchdog-5.9.cleanups/src/watchdog.c 2011-01-17 13:53:22.268899519 +0000 @@ -638,7 +638,7 @@ * if the system runs out of memory */ filename_buf = (char*)malloc(max(strlen(logdir) + sizeof("/repair-bin.stdout") + 1, strlen("/proc//oom_adj") + sizeof(int) * CHAR_BIT * 10 / 3 + 1)); if (!filename_buf) { - error(progname); + perror(progname); exit(1); } @@ -713,7 +713,7 @@ for (act = iface; act != NULL; act = act->next) syslog(LOG_INFO, "interface: %s", act->name); - syslog(LOG_INFO, "test=%s(%ld) repair=%s(%d) alive=%s heartbeat=%s temp=%s to=%s no_act=%s", + syslog(LOG_INFO, "test=%s(%ld) repair=%s(%ld) alive=%s heartbeat=%s temp=%s to=%s no_act=%s", (tbinary == NULL) ? "none" : tbinary, timeout, (rbinary == NULL) ? "none" : rbinary, rtimeout, (devname == NULL) ? "none" : devname, @@ -947,4 +947,5 @@ terminate(); /* not reached */ + exit (EXIT_SUCCESS); } diff -ur watchdog-5.9.old/src/wd_identify.c watchdog-5.9.cleanups/src/wd_identify.c --- watchdog-5.9.old/src/wd_identify.c 2010-06-17 16:21:06.000000000 +0100 +++ watchdog-5.9.cleanups/src/wd_identify.c 2011-01-17 13:44:52.016374800 +0000 @@ -20,6 +20,8 @@ #include #include #include +#include +#include #define DEVICE "watchdog-device" @@ -125,10 +127,7 @@ int main(int argc, char *const argv[]) { - FILE *fp; char *configfile = CONFIG_FILENAME; - char *filename_buf; - int count = 0; int c; struct watchdog_info ident; char *opts = "c:"; diff -ur watchdog-5.9.old/src/wd_keepalive.c watchdog-5.9.cleanups/src/wd_keepalive.c --- watchdog-5.9.old/src/wd_keepalive.c 2010-06-16 14:45:49.000000000 +0100 +++ watchdog-5.9.cleanups/src/wd_keepalive.c 2011-01-17 13:43:38.829707725 +0000 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -286,7 +287,7 @@ * if the system runs out of memory */ filename_buf = (char*)malloc(strlen("/proc//oom_adj") + sizeof(int) * CHAR_BIT * 10 / 3 + 1); if (!filename_buf) { - error(progname); + perror(progname); exit(1); }