utils: assert on streq for NULL pointers
We have streq_null for that purpose Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>master
parent
d172652753
commit
127f8c976d
|
@ -66,6 +66,7 @@ istrncmp(const char *a, const char *b, size_t n);
|
||||||
static inline bool
|
static inline bool
|
||||||
streq(const char *s1, const char *s2)
|
streq(const char *s1, const char *s2)
|
||||||
{
|
{
|
||||||
|
assert(s1 && s2);
|
||||||
return strcmp(s1, s2) == 0;
|
return strcmp(s1, s2) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue