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)
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 *
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