Fix a bug reported on the mailing list.
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.)
Showing
Please
register
or
sign in
to comment