[SVACE] remove unnecessary check code. (#259) accepted/tizen/unified/20200709.030139 submit/tizen/20200708.002229
author조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com>
Wed, 8 Jul 2020 08:55:47 +0000 (17:55 +0900)
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>
Wed, 8 Jul 2020 08:55:47 +0000 (17:55 +0900)
SVACE request us to change strerror to strerror_r for thread safety.
But, there is no need to call access() and strerror() function for error case.

So, remove unnecessary check code.

NativeLauncher/launcher/lib/core_runtime.cc

index 8f0cd26..8795ac3 100644 (file)
@@ -372,8 +372,6 @@ int CoreRuntime::initialize(const char* appType, LaunchMode launchMode)
        if (__coreclrLib == nullptr) {
                char *err = dlerror();
                _ERR("dlopen failed to open libcoreclr.so with error %s", err);
-               if (access(libCoreclr.c_str(), R_OK) == -1)
-                       _ERR("access '%s': %s\n", libCoreclr.c_str(), strerror(errno));
                return -1;
        }