In its current form, the below condition always evaluates to true. It seems
like the author meant to use "&&" rather than "||". Someone more familiar with
the code should verify this.

Thanks for your time,
Michael McConville
University of Utah

Index: Module.cpp
===================================================================
--- Module.cpp  (revision 321430)
+++ Module.cpp  (working copy)
@@ -1113,7 +1113,7 @@
     const int format_len = strlen(format);
     if (format_len > 0) {
       const char last_char = format[format_len - 1];
-      if (last_char != '\n' || last_char != '\r')
+      if (last_char == '\n' || last_char == '\r')
         strm.EOL();
     }
     Host::SystemLog(Host::eSystemLogError, "%s", strm.GetData());
@@ -1145,7 +1145,7 @@
         const int format_len = strlen(format);
         if (format_len > 0) {
           const char last_char = format[format_len - 1];
-          if (last_char != '\n' || last_char != '\r')
+          if (last_char == '\n' || last_char == '\r')
             strm.EOL();
         }
         strm.PutCString("The debug session should be aborted as the original "
@@ -1171,7 +1171,7 @@
     const int format_len = strlen(format);
     if (format_len > 0) {
       const char last_char = format[format_len - 1];
-      if (last_char != '\n' || last_char != '\r')
+      if (last_char == '\n' || last_char == '\r')
         strm.EOL();
     }
     Host::SystemLog(Host::eSystemLogWarning, "%s", strm.GetData());
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to