Fix warning for a probable bug.

It looks like the intent was to compare the result of `memcmp`, but the code was comparing the result of `strlen`.