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