[Mesa-dev] [PATCH 3/4] util: use memcmp instead of strncmp

Vlad Golovkin vlad.golovkin.mail at gmail.com
Tue May 30 22:45:15 UTC 2017


---
 src/util/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/debug.c b/src/util/debug.c
index 98b1853325..78041d414f 100644
--- a/src/util/debug.c
+++ b/src/util/debug.c
@@ -42,7 +42,7 @@ parse_debug_string(const char *debug,
 
             for (; n = strcspn(s, ", "), *s; s += MAX2(1, n)) {
                if (strlen(control->string) == n &&
-                   !strncmp(control->string, s, n))
+                   !memcmp(control->string, s, n))
                   flag |= control->flag;
             }
          }
-- 
2.11.0



More information about the mesa-dev mailing list