Use memcmp suggested in review feedback.