summaryrefslogtreecommitdiffstats
path: root/src/util/testdb.c
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-06-19 10:55:08 +0200
committerAllan McRae <allan@archlinux.org>2010-06-20 17:04:58 +0200
commit59c47aaf529df02ec1577fe727c3c84d13592666 (patch)
tree63049bcc89e7058376ce0607ddee116b2f819ddc /src/util/testdb.c
parentd7dccd541962f0dd8bf323ae11633e595bfb4922 (diff)
downloadpacman-59c47aaf529df02ec1577fe727c3c84d13592666.tar.gz
pacman-59c47aaf529df02ec1577fe727c3c84d13592666.tar.xz
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 <allan@archlinux.org>
Diffstat (limited to 'src/util/testdb.c')
-rw-r--r--src/util/testdb.c2
1 files changed, 1 insertions, 1 deletions
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;
}