util: use standard name for strncmp()
authorEric Engestrom <eric.engestrom@intel.com>
Tue, 20 Nov 2018 11:48:38 +0000 (11:48 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Fri, 19 Jul 2019 21:39:38 +0000 (22:39 +0100)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/auxiliary/hud/hud_context.c
src/util/u_string.h

index 9f9db850a71dbdbfe6ebc64f719225b41b7f848e..e7e99944993ad8ffaf32960a4d7f01f419c02ab8 100644 (file)
@@ -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;
    }
index 8d178031d8cb82ee5e3298515d7735cec51f7dd4..8c8ad5a536506fff2e1bad23f48637657e1932f0 100644 (file)
@@ -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