]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
[PATCH] sparse cleanups on the tree
authorgreg@kroah.com <greg@kroah.com>
Tue, 19 Oct 2004 06:14:20 +0000 (23:14 -0700)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 05:06:44 +0000 (22:06 -0700)
namedev_parse.c
udev.c
udev_remove.c
udevd.c

index 7e3783320256818948a547d744e0062bd5fe3c2e..22e3523f3d8b67c474d245a15359f2d1e2157993 100644 (file)
@@ -441,7 +441,7 @@ exit:
        return retval;
 }
 
-int namedev_init_rules()
+int namedev_init_rules(void)
 {
        struct stat stats;
 
@@ -453,7 +453,7 @@ int namedev_init_rules()
                                         udev_rules_filename, RULEFILE_SUFFIX);
 }
 
-int namedev_init_permissions()
+int namedev_init_permissions(void)
 {
        struct stat stats;
 
diff --git a/udev.c b/udev.c
index dfb2baddbc34dfdabbf5264bd9abf587d68304a2..839bfa6520299461e63d6261d01a2bc173df15d7 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -28,6 +28,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <signal.h>
+#include <unistd.h>
 
 #include "libsysfs/sysfs/libsysfs.h"
 #include "udev.h"
index 0dcec731ead0457745c49771b4a061448f5d64f4..cd9d27f8dce2836f5576be021f732f0880e66b13 100644 (file)
@@ -28,6 +28,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
+#include <sys/stat.h>
 
 #include "udev.h"
 #include "udev_lib.h"
diff --git a/udevd.c b/udevd.c
index 421c25a6e8df7fcdf8eb9ba31e0730bd1ba9f06a..9e0f71b58302ae7efa533f4c43ab2db4c3311a04 100644 (file)
--- a/udevd.c
+++ b/udevd.c
@@ -177,7 +177,7 @@ static struct hotplug_msg *running_with_devpath(struct hotplug_msg *msg)
 }
 
 /* exec queue management routine executes the events and delays events for the same devpath */
-static void exec_queue_manager()
+static void exec_queue_manager(void)
 {
        struct hotplug_msg *loop_msg;
        struct hotplug_msg *tmp_msg;
@@ -207,7 +207,7 @@ static void msg_move_exec(struct hotplug_msg *msg)
 }
 
 /* msg queue management routine handles the timeouts and dispatches the events */
-static void msg_queue_manager()
+static void msg_queue_manager(void)
 {
        struct hotplug_msg *loop_msg;
        struct hotplug_msg *tmp_msg;
@@ -241,7 +241,7 @@ recheck:
        if (list_empty(&msg_list) == 0) {
                struct itimerval itv = {{0, 0}, {EVENT_TIMEOUT_SEC - msg_age, 0}};
                dbg("next event expires in %li seconds", EVENT_TIMEOUT_SEC - msg_age);
-               setitimer(ITIMER_REAL, &itv, 0);
+               setitimer(ITIMER_REAL, &itv, NULL);
        }
 }
 
@@ -366,11 +366,11 @@ static void udev_done(int pid)
        }
 }
 
-static void reap_kids()
+static void reap_kids(void)
 {
        /* reap all dead children */
        while(1) {
-               int pid = waitpid(-1, 0, WNOHANG);
+               int pid = waitpid(-1, NULL, WNOHANG);
                if ((pid == -1) || (pid == 0))
                        break;
                udev_done(pid);
@@ -380,7 +380,7 @@ static void reap_kids()
 /* just read everything from the pipe and clear the flag,
  * the useful flags were set in the signal handler
  */
-static void user_sighandler()
+static void user_sighandler(void)
 {
        int sig;
        while(1) {