setpwnam.c:176:9: warning: ignoring return value of ‘link’, declared with attribute warn_unused_result
Signed-off-by: Karel Zak <kzak@redhat.com>
#include <paths.h>
#include "setpwnam.h"
+#include "c.h"
#define false 0
#define true 1
/* we don't care if we can't remove the backup file */
unlink(PASSWD_FILE".OLD");
/* we don't care if we can't create the backup file */
- link(PASSWD_FILE, PASSWD_FILE".OLD");
+ ignore_result( link(PASSWD_FILE, PASSWD_FILE".OLD") );
/* we DO care if we can't rename to the passwd file */
if(rename(PTMP_FILE, PASSWD_FILE) < 0)
goto fail;