提交 27bab9ca 编写于 作者: P Peter Krempa

internal: Use g_strcmp0 in STR(N)EQ_NULLABLE

Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 634dbd93
......@@ -86,10 +86,8 @@
#define STRCASEPREFIX(a, b) (c_strncasecmp(a, b, strlen(b)) == 0)
#define STRSKIP(a, b) (STRPREFIX(a, b) ? (a) + strlen(b) : NULL)
#define STREQ_NULLABLE(a, b) \
((a) ? (b) && STREQ((a), (b)) : !(b))
#define STRNEQ_NULLABLE(a, b) \
((a) ? !(b) || STRNEQ((a), (b)) : !!(b))
#define STREQ_NULLABLE(a, b) (g_strcmp0(a, b) == 0)
#define STRNEQ_NULLABLE(a, b) (g_strcmp0(a, b) != 0)
#define NUL_TERMINATE(buf) do { (buf)[sizeof(buf)-1] = '\0'; } while (0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册