[cvs] bogofilter/src bogohome.c,1.7,1.8 wordlists.c,1.81,1.82
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <re...@us...> - 2004-11-23 02:36:42
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv648/src Modified Files: bogohome.c wordlists.c Log Message: Use NULL in null-pointer checks. Reserve '!' for bools. Index: bogohome.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/bogohome.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- bogohome.c 28 May 2004 00:35:48 -0000 1.7 +++ bogohome.c 23 Nov 2004 02:36:32 -0000 1.8 @@ -41,7 +41,7 @@ else *bogohome = '\0'; } - if (!*bogohome) { + if (*bogohome == '\0') { xfree(bogohome); bogohome = xstrdup(CURDIR_S); } Index: wordlists.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/wordlists.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- wordlists.c 22 Nov 2004 21:12:25 -0000 1.81 +++ wordlists.c 23 Nov 2004 02:36:32 -0000 1.82 @@ -85,7 +85,7 @@ /* FIXME: create or reuse environment from filepath */ dbe = list_searchinsert(bf_dirname(list->filepath)); - if (!dbe) + if (dbe == NULL) exit(EX_ERROR); list->dsh = ds_open(dbe, bogohome, list->filepath, mode); /* FIXME */ if (list->dsh == NULL) { @@ -231,8 +231,8 @@ int listcount=0; while(1) { - if (!list) break; - if (! list->name) { + if (list == NULL) break; + if (list->name == NULL) { fprintf(stderr, "A list has no name.\n"); exit(EX_ERROR); } |