egl: drop unneeded sentinel from level_strings[]
The array is local so we already know its size. v2: Correct loop condition (Bartosz) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Chad Versace <chadversary@chromium.org>
This commit is contained in:
parent
239e7ee91b
commit
54f619fb9b
|
@ -41,6 +41,7 @@
|
|||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include "c11/threads.h"
|
||||
#include "util/macros.h"
|
||||
|
||||
#include "egllog.h"
|
||||
|
||||
|
@ -82,7 +83,6 @@ static const char *level_strings[] = {
|
|||
"warning",
|
||||
"info",
|
||||
"debug",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
|
@ -129,7 +129,7 @@ _eglInitLogger(void)
|
|||
|
||||
log_env = getenv("EGL_LOG_LEVEL");
|
||||
if (log_env) {
|
||||
for (i = 0; level_strings[i]; i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(level_strings); i++) {
|
||||
if (strcasecmp(log_env, level_strings[i]) == 0) {
|
||||
level = i;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue