From: Eric Engestrom Date: Tue, 20 Nov 2018 11:48:38 +0000 (+0000) Subject: util: use standard name for strncmp() X-Git-Tag: upstream/19.3.0~3994 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88ddb2e18646344df215becb86e70453c55ab2cd;p=platform%2Fupstream%2Fmesa.git util: use standard name for strncmp() Signed-off-by: Eric Engestrom Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Reviewed-by: Eric Anholt --- diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index 9f9db85..e7e9994 100644 --- a/src/gallium/auxiliary/hud/hud_context.c +++ b/src/gallium/auxiliary/hud/hud_context.c @@ -1195,7 +1195,7 @@ hud_parse_env_var(struct hud_context *hud, struct pipe_screen *screen, boolean sort_items = false; const char *period_env; - if (util_strncmp(env, "simple,", 7) == 0) { + if (strncmp(env, "simple,", 7) == 0) { hud->simple = true; env += 7; } diff --git a/src/util/u_string.h b/src/util/u_string.h index 8d17803..8c8ad5a 100644 --- a/src/util/u_string.h +++ b/src/util/u_string.h @@ -156,6 +156,7 @@ util_strcmp(const char *s1, const char *s2) return 0; } +#define strncmp util_strncmp static inline int util_strncmp(const char *s1, const char *s2, size_t n) { @@ -184,7 +185,6 @@ util_strncmp(const char *s1, const char *s2, size_t n) #define util_vasprintf vasprintf #define util_sprintf sprintf #define util_strcmp strcmp -#define util_strncmp strncmp #define util_strcasecmp strcasecmp #endif