From: Petr Uzel Date: Thu, 3 Feb 2011 14:04:54 +0000 (+0100) Subject: uuidd: use die() where possible X-Git-Tag: v2.19~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2d16924217d2d8ed41e56695f6e3ce827ca77d03;p=thirdparty%2Futil-linux.git uuidd: use die() where possible Signed-off-by: Petr Uzel --- diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c index 0d61396055..79c52b19fa 100644 --- a/misc-utils/uuidd.c +++ b/misc-utils/uuidd.c @@ -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) {