• 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
test_monitor.cpp 3.75 KB