From 59c47aaf529df02ec1577fe727c3c84d13592666 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 19 Jun 2010 18:55:08 +1000 Subject: Clarify testing within conditional statements Follow the HACKING guidelines and always use != 0 or == 0 rather than negation within conditional statements to improve clarity. Most of these are !strcmp usages which is the example of what not to do in the HACKING document. Signed-off-by: Allan McRae --- src/util/testdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util/testdb.c') diff --git a/src/util/testdb.c b/src/util/testdb.c index 6d351ebd..45a2626d 100644 --- a/src/util/testdb.c +++ b/src/util/testdb.c @@ -69,7 +69,7 @@ static int db_test(char *dbpath, int local) } while ((ent = readdir(dir)) != NULL) { - if(!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, "..") + if(strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0 || ent->d_name[0] == '.') { continue; } -- cgit v1.2.3-70-g09d2