X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Floglevel.c;h=9f65df00664cbfb87fde03d551e5aa24dfbf3c49;hp=e59c248131b2cc57885ff6be50eb63b4da1467e1;hb=f41294ed836a1eaa49f125aea9d95e4e35ad3844;hpb=7e8f2e9cce651c81094a864bbffefcaa4bcc7a51 diff --git a/src/bin/lttng/loglevel.c b/src/bin/lttng/loglevel.c index e59c24813..9f65df006 100644 --- a/src/bin/lttng/loglevel.c +++ b/src/bin/lttng/loglevel.c @@ -7,6 +7,7 @@ #include "loglevel.h" #include +#include #include #include @@ -119,25 +120,7 @@ const struct loglevel_name_value loglevel_python_values[] = { static bool string_equal_insensitive(const char *a, const char *b) { - bool result; - - assert(a && b); - - while (*a && *b) { - if (toupper(*a) != toupper(*b)) { - result = false; - goto end; - } - - a++; - b++; - } - - /* If a and b don't have the same length, consider them unequal. */ - result = *a == *b; - -end: - return result; + return strcasecmp(a, b) == 0; } static