locate - change sizeof(char **) to sizeof(char *)

2014-11-15 Thread Nicolas Bedos
In usr.bin/locate/locate/locate.c and util.c the variable dbv is defined as a pointer to char * and is used to access the path to every database provided to locate. E.g. when running locate -d /path/to/db1 -d /path/to/db2 -d /path/to/db3 * *dbv points to '/path/to/db1' *(dbv+1)

Re: locate - change sizeof(char **) to sizeof(char *)

2014-11-15 Thread Ted Unangst
On Sat, Nov 15, 2014 at 18:42, Nicolas Bedos wrote: In usr.bin/locate/locate/locate.c and util.c the variable dbv is defined as a pointer to char * and is used to access the path to every database provided to locate. E.g. when running locate -d /path/to/db1 -d /path/to/db2 -d /path/to/db3 *

Re: locate - change sizeof(char **) to sizeof(char *)

2014-11-15 Thread Nicolas Bedos
Ted Unangst wrote: I think using sizeof(*dbv) would be the better idiom. Here's an updated diff, including Tobias Stoeckmann's fix. Index: src/usr.bin/locate/locate/util.c === RCS file: /cvs/src/usr.bin/locate/locate/util.c,v