freebsd-skq/usr.bin/hexdump
Dimitry Andric 7818f8df2e Correct a logic error in usr.bin/hexdump/conv.c, found by clang.
Whenever the conv_c() function encounters an incomplete multibyte char,
it peeks ahead.  It also sets p to peekbuf, to indicate it is still
processing the incomplete character.

However, on the next retry, it compares buf against peekbuf, which
always returns false, since both buf and peekbuf are local char arrays,
whose addresses are never the same.

Fix this by comparing against p instead, which was the intention.  Also
turn peekbuf into an array of u_char, to prevent conversion warnings.

MFC after:	1 week
2011-12-17 15:33:26 +00:00
..
conv.c Correct a logic error in usr.bin/hexdump/conv.c, found by clang. 2011-12-17 15:33:26 +00:00
display.c Remove the advertising clause from UCB copyrighted files in usr.bin. This 2010-12-11 08:32:16 +00:00
hexdump.1 Remove the advertising clause from UCB copyrighted files in usr.bin. This 2010-12-11 08:32:16 +00:00
hexdump.c Remove the advertising clause from UCB copyrighted files in usr.bin. This 2010-12-11 08:32:16 +00:00
hexdump.h Remove the advertising clause from UCB copyrighted files in usr.bin. This 2010-12-11 08:32:16 +00:00
hexsyntax.c Remove the advertising clause from UCB copyrighted files in usr.bin. This 2010-12-11 08:32:16 +00:00
Makefile Build usr.bin/ with WARNS=6 by default. 2010-01-02 10:27:05 +00:00
od.1 Remove the advertising clause from UCB copyrighted files in usr.bin. This 2010-12-11 08:32:16 +00:00
odsyntax.c Remove the advertising clause from UCB copyrighted files in usr.bin. This 2010-12-11 08:32:16 +00:00
parse.c Remove the advertising clause from UCB copyrighted files in usr.bin. This 2010-12-11 08:32:16 +00:00