Remove most usages of strncmp()
commitae7139adcfa65991c71616e8de7910ff722d4166
authorDan McGee <dan@archlinux.org>
Tue, 5 Jul 2011 19:16:17 +0000 (5 14:16 -0500)
committerDan McGee <dan@archlinux.org>
Wed, 6 Jul 2011 02:29:02 +0000 (5 21:29 -0500)
tree2126517e48edf71ae49e51fa264cc8ea4b946f81
parentdfc532668d4a4182ce196a895fdd5b017b505c6f
Remove most usages of strncmp()

The supposed safety blanket of this function is better handled by
explicit length checking and usages of strlen() on known NULL-terminated
strings rather than hoping things fit in a buffer. We also have no need
to fully fill a PATH_MAX length variable with NULLs every time as long
as a single terminating byte is there. Remove usages of it by using
strcpy() or memcpy() as appropriate, after doing length checks via
strlen().

Signed-off-by: Dan McGee <dan@archlinux.org>
lib/libalpm/handle.c
src/pacman/query.c
src/pacman/util.c
src/util/vercmp.c