From d8ac5cabb4d6725c422376cd2d9d2390eacde07d Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Thu, 4 Mar 1999 13:22:06 +0000 Subject: [PATCH] Shut up gcc -Wparentheses --- tests/progs/slapd-addel.c | 2 +- tests/progs/slapd-tester.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/progs/slapd-addel.c b/tests/progs/slapd-addel.c index 2f0df7b336..d2adaae55e 100644 --- a/tests/progs/slapd-addel.c +++ b/tests/progs/slapd-addel.c @@ -185,7 +185,7 @@ get_add_entry( char *filename, LDAPMod ***mods ) FILE *fp; char *entry = NULL; - if ( fp = fopen( filename, "r" )) { + if ( (fp = fopen( filename, "r" )) != NULL ) { char line[BUFSIZ]; if ( fgets( line, BUFSIZ, fp )) { diff --git a/tests/progs/slapd-tester.c b/tests/progs/slapd-tester.c index 2d63a1d9ee..cd8bf1f59a 100644 --- a/tests/progs/slapd-tester.c +++ b/tests/progs/slapd-tester.c @@ -259,7 +259,7 @@ get_search_filters( char *filename, char *filters[] ) FILE *fp; int filter = 0; - if ( fp = fopen( filename, "r" )) { + if ( (fp = fopen( filename, "r" )) != NULL ) { char line[BUFSIZ]; while (( filter < MAXREQS ) && ( fgets( line, BUFSIZ, fp ))) { @@ -283,7 +283,7 @@ get_read_entries( char *filename, char *entries[] ) FILE *fp; int entry = 0; - if ( fp = fopen( filename, "r" )) { + if ( (fp = fopen( filename, "r" )) != NULL ) { char line[BUFSIZ]; while (( entry < MAXREQS ) && ( fgets( line, BUFSIZ, fp ))) { -- 2.39.5