X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fmem%2Fmem.h;h=20286dcbefd42f99a7e88932ab1ef4cda115f2e2;hb=9e800830de8a9bbb9f103f120ea7de9220b6869d;hp=19f69c038c67efe1e11ac8ab5cec036123aa3b95;hpb=e46957c87a57ff2efd0b23e230599cce529f1f92;p=ccan diff --git a/ccan/mem/mem.h b/ccan/mem/mem.h index 19f69c03..20286dcb 100644 --- a/ccan/mem/mem.h +++ b/ccan/mem/mem.h @@ -104,7 +104,7 @@ void *memcchr(void const *data, int c, size_t data_len); PURE_FUNCTION static inline bool memeq(const void *a, size_t al, const void *b, size_t bl) { - return al == bl && !memcmp(a, b, bl); + return al == bl && (al == 0 || !memcmp(a, b, bl)); } /**