瀏覽代碼

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 年之前
父節點
當前提交
3cd0e6cc9a
共有 1 個文件被更改,包括 1 次插入1 次删除
  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))
         {
             // 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();