From 127f8c976d93dc27d059bde2a250815c29302c2e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 30 Mar 2021 08:09:37 +1000 Subject: utils: assert on streq for NULL pointers We have streq_null for that purpose Signed-off-by: Peter Hutterer --- src/utils.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/utils.h b/src/utils.h index cd3e9b1..7557dab 100644 --- a/src/utils.h +++ b/src/utils.h @@ -66,6 +66,7 @@ istrncmp(const char *a, const char *b, size_t n); static inline bool streq(const char *s1, const char *s2) { + assert(s1 && s2); return strcmp(s1, s2) == 0; } -- cgit v1.2.1