bug in build_wordlist_paths (wordlists.c around l. 109)

David Relson relson at osagesoftware.com
Sat Jan 31 03:12:57 CET 2004


On Sat, 31 Jan 2004 03:04:03 +0100
Matthias Andree wrote:

> size_t build_wordlist_paths(char **filepaths, const char *path)
> {
>     bool ok;
>     size_t count = 1;
>     
>     ok = build_path(filepaths[0], sizeof(FILEPATH), path, WORDLIST) ==
>     0;
> 
>     return count;
> }
> 
> Looks bogus:
> 
> 1. why do we return a constant 1?
> 2. what is ok for? ICC complains that it isn't used after assignment.

Matthias,

I'm guessing that you've updated from cvs recently.  The function above
is, I think, what's left after removing deprecated code.  The function
used to return a count of wordlists found (1 if wordlist.db and 2 if
spamlist/goodlist).

Likely there are several other places where the remaining code is a
shadow of the original code and no longer makes sense.

Let me know about them and I'll see what I can do about fixing them.

David




More information about the bogofilter-dev mailing list