Merge pull request #3734 from Dmitry-Me:reduceVariableScope2

This commit is contained in:
Vadim Pisarevsky 2015-02-24 15:38:19 +00:00
commit b64b82a1ef

View File

@ -309,13 +309,13 @@ cv::String CameraWrapperConnector::getPathLibFolder()
const char* libName=dl_info.dli_fname; const char* libName=dl_info.dli_fname;
while( ((*libName)=='/') || ((*libName)=='.') ) while( ((*libName)=='/') || ((*libName)=='.') )
libName++; libName++;
char lineBuf[2048];
FILE* file = fopen("/proc/self/smaps", "rt"); FILE* file = fopen("/proc/self/smaps", "rt");
if(file) if(file)
{ {
char lineBuf[2048];
while (fgets(lineBuf, sizeof lineBuf, file) != NULL) while (fgets(lineBuf, sizeof lineBuf, file) != NULL)
{ {
//verify that line ends with library name //verify that line ends with library name