Bläddra i källkod

HPCC-14576 Fix incorrect code detected by compiler warning

Code was incorrect, and would have resulted in libraries that started 'l' but
did not start 'lib' not having the 'lib' added when it should have. Unlikely
to have caused a problem in practice.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 år sedan
förälder
incheckning
3cd0e6cc9a
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      system/jlib/jutil.cpp

+ 1 - 1
system/jlib/jutil.cpp

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