Fix memchr checks

(thanks caolan for spotting)

Change-Id: I17093b4173b9a2fca2760240375bcb14313224ef