summaryrefslogtreecommitdiff
path: root/nscd/nscd.c
diff options
context:
space:
mode:
Diffstat (limited to 'nscd/nscd.c')
-rw-r--r--nscd/nscd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nscd/nscd.c b/nscd/nscd.c
index 8a8e45a9a0..16f55cfdeb 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -487,10 +487,10 @@ write_pid (const char *file)
return -1;
fprintf (fp, "%d\n", getpid ());
- if (fflush (fp) || ferror (fp))
- return -1;
+
+ int result = fflush (fp) || ferror (fp) ? -1 : 0;
fclose (fp);
- return 0;
+ return result;
}