uuidd: use die() where possible

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
This commit is contained in:
Petr Uzel 2011-02-03 15:04:54 +01:00 committed by Karel Zak
parent 83a4498d77
commit 2d16924217
1 changed files with 4 additions and 6 deletions

View 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) {