소스 검색

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();