diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h index 838ceb9fe8f10580a781c846caf21b18680554b0..7848a41b6677cef1f8082b255b9f695d040991cd 100644 --- a/glib/gstrfuncs.h +++ b/glib/gstrfuncs.h @@ -154,7 +154,7 @@ gboolean (g_str_has_prefix) (const gchar *str, * Without it, it thinks strlen and memcmp may be getting passed NULL * despite the explicit check for NULL right above the calls. */ -#define _G_STR_NONNULL(x) ((x) + !(x)) +#define _G_STR_NONNULL(x) ((x) + (x == NULL)) #define g_str_has_prefix(STR, PREFIX) \ (__builtin_constant_p (PREFIX)? \