提交 c061fc26 编写于 作者: P Pavel Hrdina

use g_ascii_strncasecmp instead of c_strncasecmp from gnulib

Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Reviewed-by: NCole Robinson <crobinso@redhat.com>
上级 c89e792d
...@@ -63,7 +63,6 @@ ...@@ -63,7 +63,6 @@
#include "libvirt/libvirt-admin.h" #include "libvirt/libvirt-admin.h"
#include "libvirt/virterror.h" #include "libvirt/virterror.h"
#include "c-strcase.h"
#include "glibcompat.h" #include "glibcompat.h"
/* Merely casting to (void) is not sufficient since the /* Merely casting to (void) is not sufficient since the
...@@ -79,11 +78,11 @@ ...@@ -79,11 +78,11 @@
#define STRNEQ(a, b) (strcmp(a, b) != 0) #define STRNEQ(a, b) (strcmp(a, b) != 0)
#define STRCASENEQ(a, b) (g_ascii_strcasecmp(a, b) != 0) #define STRCASENEQ(a, b) (g_ascii_strcasecmp(a, b) != 0)
#define STREQLEN(a, b, n) (strncmp(a, b, n) == 0) #define STREQLEN(a, b, n) (strncmp(a, b, n) == 0)
#define STRCASEEQLEN(a, b, n) (c_strncasecmp(a, b, n) == 0) #define STRCASEEQLEN(a, b, n) (g_ascii_strncasecmp(a, b, n) == 0)
#define STRNEQLEN(a, b, n) (strncmp(a, b, n) != 0) #define STRNEQLEN(a, b, n) (strncmp(a, b, n) != 0)
#define STRCASENEQLEN(a, b, n) (c_strncasecmp(a, b, n) != 0) #define STRCASENEQLEN(a, b, n) (g_ascii_strncasecmp(a, b, n) != 0)
#define STRPREFIX(a, b) (strncmp(a, b, strlen(b)) == 0) #define STRPREFIX(a, b) (strncmp(a, b, strlen(b)) == 0)
#define STRCASEPREFIX(a, b) (c_strncasecmp(a, b, strlen(b)) == 0) #define STRCASEPREFIX(a, b) (g_ascii_strncasecmp(a, b, strlen(b)) == 0)
#define STRSKIP(a, b) (STRPREFIX(a, b) ? (a) + strlen(b) : NULL) #define STRSKIP(a, b) (STRPREFIX(a, b) ? (a) + strlen(b) : NULL)
#define STREQ_NULLABLE(a, b) (g_strcmp0(a, b) == 0) #define STREQ_NULLABLE(a, b) (g_strcmp0(a, b) == 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册