From: Petr Uzel Date: Thu, 3 May 2012 19:01:51 +0000 (+0200) Subject: uuidd: use ignore_result helper X-Git-Tag: v2.22-rc1~441 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6f3dc781157aba6b2e219991f5a469defbab55f;p=thirdparty%2Futil-linux.git uuidd: use ignore_result helper Signed-off-by: Petr Uzel --- diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c index be3e3cf074..50ae61fa8b 100644 --- a/misc-utils/uuidd.c +++ b/misc-utils/uuidd.c @@ -34,6 +34,7 @@ extern int optind; #include "uuid.h" #include "uuidd.h" #include "writeall.h" +#include "c.h" #include "closestream.h" #include "nls.h" @@ -327,9 +328,7 @@ static void server_loop(const char *socket_path, const char *pidfile_path, if (pidfile_path) { sprintf(reply_buf, "%8d\n", getpid()); - if (ftruncate(fd_pidfile, 0)) { - /* Silence warn_unused_result */ - } + ignore_result( ftruncate(fd_pidfile, 0) ); write_all(fd_pidfile, reply_buf, strlen(reply_buf)); if (fd_pidfile > 1) close(fd_pidfile); /* Unlock the pid file */