summaryrefslogtreecommitdiff
path: root/testsuite/nsswitch/getpwent_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/nsswitch/getpwent_r.c')
-rw-r--r--testsuite/nsswitch/getpwent_r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/testsuite/nsswitch/getpwent_r.c b/testsuite/nsswitch/getpwent_r.c
index 2ba7ea96f1e..5e774911de7 100644
--- a/testsuite/nsswitch/getpwent_r.c
+++ b/testsuite/nsswitch/getpwent_r.c
@@ -21,7 +21,7 @@ void dump_pwent(char *id)
sprintf(fname, "/tmp/getpwent_r-%s.out-%d", id, getpid());
- if ((fptr = fopen(fname, "w")) < 0) {
+ if ((fptr = fopen(fname, "w")) == 0) {
fprintf(stderr, "ERROR: could not open file %s: %s\n", fname,
sys_errlist[errno]);
return;