• Arthur O'Dwyer's avatar
    Fix a bug reported on the mailing list. · f718d2be
    Arthur O'Dwyer authored
    Both memcmp and strcmp return zero on equal, nonzero on nonequal;
    so all of these tests were backwards.
    
    The original committer fixed the failure by comparing 22 bytes instead
    of the correct 21, so that the assertions would trigger only if the
    22nd byte happened to match exactly --- which was rare.
    
    The correct fix is to compare the right number of bytes with the
    right sense.  (I think all of the ".addr" fields are null-terminated,
    in which case it's more appropriate to use strcmp throughout.)
    f718d2be
Name
Last commit
Last update
builds Loading commit data...
doc Loading commit data...
foreign/openpgm Loading commit data...
include Loading commit data...
perf Loading commit data...
src Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
INSTALL Loading commit data...
MAINTAINERS Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
acinclude.m4 Loading commit data...
autogen.sh Loading commit data...
branding.bmp Loading commit data...
configure.in Loading commit data...
installer.ico Loading commit data...
version.sh Loading commit data...