Sfoglia il codice sorgente

Merge pull request #7979 from richardkchapman/strncmp-warning

HPCC-14576 Fix incorrect code detected by compiler warning

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 9 anni fa
parent
commit
b640755b4a
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      system/jlib/jutil.cpp

+ 1 - 1
system/jlib/jutil.cpp

@@ -401,7 +401,7 @@ HINSTANCE LoadSharedObject(const char *name, bool isGlobal, bool raiseOnError)
         if (!streq(ext.str(), SharedObjectExtension))
         {
             // Assume if there's no .so, there may also be no lib at the beginning
-            if (strncmp(tail.str(), SharedObjectPrefix, strlen(SharedObjectPrefix) != 0))
+            if (strncmp(tail.str(), SharedObjectPrefix, strlen(SharedObjectPrefix)) != 0)
                 path.append(SharedObjectPrefix);
             path.append(tail).append(ext).append(SharedObjectExtension);
             name = path.str();