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:
Emil Velikov 2017-05-04 19:34:43 +01:00 committed by Emil Velikov
parent 239e7ee91b
commit 54f619fb9b
1 changed files with 2 additions and 2 deletions

View File

@ -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;