]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidd: use die() where possible
authorPetr Uzel <petr.uzel@suse.cz>
Thu, 3 Feb 2011 14:04:54 +0000 (15:04 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 8 Feb 2011 14:21:49 +0000 (15:21 +0100)
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
misc-utils/uuidd.c

index 0d613960556d24ecd485c3fade6080e6a1e051be..79c52b19fa85de98535eab479eab40187cf1abe7 100644 (file)
@@ -277,10 +277,8 @@ static void server_loop(const char *socket_path, const char *pidfile_path,
         */
        while (!debug && s <= 2) {
                s = dup(s);
-               if (s < 0) {
-                       perror("dup");
-                       exit(1);
-               }
+               if (s < 0)
+                       die("dup");
        }
 
        /*
@@ -333,8 +331,8 @@ static void server_loop(const char *socket_path, const char *pidfile_path,
                if (ns < 0) {
                        if ((errno == EAGAIN) || (errno == EINTR))
                                continue;
-                       perror("accept");
-                       exit(1);
+                       else
+                               die("accept");
                }
                len = read(ns, &op, 1);
                if (len != 1) {