[Lldb-commits] [lldb] r182540 - Don't compare 4 characters on a 2 character string.
Greg Clayton
gclayton at apple.com
Wed May 22 16:36:10 PDT 2013
Author: gclayton
Date: Wed May 22 18:36:10 2013
New Revision: 182540
URL: http://llvm.org/viewvc/llvm-project?rev=182540&view=rev
Log:
Don't compare 4 characters on a 2 character string.
Modified:
lldb/trunk/source/lldb-log.cpp
Modified: lldb/trunk/source/lldb-log.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb-log.cpp?rev=182540&r1=182539&r2=182540&view=diff
==============================================================================
--- lldb/trunk/source/lldb-log.cpp (original)
+++ lldb/trunk/source/lldb-log.cpp Wed May 22 18:36:10 2013
@@ -142,7 +142,7 @@ lldb_private::DisableLog (const char **c
else if (0 == ::strncasecmp(arg, "symbol", 6)) flag_bits &= ~LIBLLDB_LOG_SYMBOLS;
else if (0 == ::strncasecmp(arg, "module", 6)) flag_bits &= ~LIBLLDB_LOG_MODULES;
else if (0 == ::strncasecmp(arg, "mmap", 4)) flag_bits &= ~LIBLLDB_LOG_MMAP;
- else if (0 == ::strncasecmp(arg, "os", 4)) flag_bits &= ~LIBLLDB_LOG_OS;
+ else if (0 == ::strcasecmp(arg, "os")) flag_bits &= ~LIBLLDB_LOG_OS;
else
{
feedback_strm->Printf ("error: unrecognized log category '%s'\n", arg);
@@ -212,7 +212,7 @@ lldb_private::EnableLog (StreamSP &log_s
else if (0 == ::strncasecmp(arg, "symbol", 6)) flag_bits |= LIBLLDB_LOG_SYMBOLS;
else if (0 == ::strncasecmp(arg, "module", 6)) flag_bits |= LIBLLDB_LOG_MODULES;
else if (0 == ::strncasecmp(arg, "mmap", 4)) flag_bits |= LIBLLDB_LOG_MMAP;
- else if (0 == ::strncasecmp(arg, "os", 4)) flag_bits |= LIBLLDB_LOG_OS;
+ else if (0 == ::strcasecmp(arg, "os")) flag_bits |= LIBLLDB_LOG_OS;
else
{
feedback_strm->Printf("error: unrecognized log category '%s'\n", arg);
More information about the lldb-commits
mailing list