Skip to content
Snippets Groups Projects
Commit f1299524 authored by Fons Rademakers's avatar Fons Rademakers
Browse files

fix coverity 10533.

git-svn-id: http://root.cern.ch/svn/root/trunk@36305 27541ba8-7e3a-0410-8455-c3a389f83636
parent e39de4db
No related branches found
No related tags found
No related merge requests found
......@@ -620,7 +620,7 @@ void ProofdExec()
ErrorInfo("ProofdExec: setting: %s", roottmp);
// User, host, rpid
char *rootentity = new char[gUser.length()+gOpenHost.length()+33];
snprintf(rootentity, gUser.length()+gOpenHost.length()+33,
snprintf(rootentity, gUser.length()+gOpenHost.length()+33,
"ROOTENTITY=%s:%d@%s", gUser.c_str(), gRemPid, gOpenHost.c_str());
putenv(rootentity);
if (gDebug > 2)
......@@ -661,39 +661,39 @@ void ProofdExec()
ErrorInfo("ProofdExec: setting: %s", rootsys);
#endif
#ifndef ROOTLIBDIR
char *ldpath;
char *oldpath, *ldpath;
# if defined(__hpux) || defined(_HIUX_SOURCE)
if (getenv("SHLIB_PATH")) {
ldpath = new char[32+gConfDir.length()+strlen(getenv("SHLIB_PATH"))];
snprintf(ldpath, 32+gConfDir.length()+strlen(getenv("SHLIB_PATH")),
"SHLIB_PATH=%s/lib:%s", gConfDir.c_str(), getenv("SHLIB_PATH"));
if ((oldpath = getenv("SHLIB_PATH")) && strlen(oldpath) > 0) {
ldpath = new char[32+gConfDir.length()+strlen(oldpath)];
snprintf(ldpath, 32+gConfDir.length()+strlen(oldpath),
"SHLIB_PATH=%s/lib:%s", gConfDir.c_str(), oldpath);
} else {
ldpath = new char[32+gConfDir.length()];
snprintf(ldpath, 32+gConfDir.length(), "SHLIB_PATH=%s/lib", gConfDir.c_str());
}
# elif defined(_AIX)
if (getenv("LIBPATH")) {
ldpath = new char[32+gConfDir.length()+strlen(getenv("LIBPATH"))];
snprintf(ldpath, 32+gConfDir.length()+strlen(getenv("LIBPATH")),
"LIBPATH=%s/lib:%s", gConfDir.c_str(), getenv("LIBPATH"));
if ((oldpath = getenv("LIBPATH")) && strlen(oldpath) > 0) {
ldpath = new char[32+gConfDir.length()+strlen(oldpath)];
snprintf(ldpath, 32+gConfDir.length()+strlen(oldpath),
"LIBPATH=%s/lib:%s", gConfDir.c_str(), oldpath);
} else {
ldpath = new char[32+gConfDir.length()];
snprintf(ldpath, 32+gConfDir.length(), "LIBPATH=%s/lib", gConfDir.c_str());
}
# elif defined(__APPLE__)
if (getenv("DYLD_LIBRARY_PATH")) {
ldpath = new char[32+gConfDir.length()+strlen(getenv("DYLD_LIBRARY_PATH"))];
snprintf(ldpath, 32+gConfDir.length()+strlen(getenv("DYLD_LIBRARY_PATH")),
"DYLD_LIBRARY_PATH=%s/lib:%s", gConfDir.c_str(), getenv("DYLD_LIBRARY_PATH"));
if ((oldpath = getenv("DYLD_LIBRARY_PATH")) && strlen(oldpath) > 0) {
ldpath = new char[32+gConfDir.length()+strlen(oldpath)];
snprintf(ldpath, 32+gConfDir.length()+strlen(oldpath),
"DYLD_LIBRARY_PATH=%s/lib:%s", gConfDir.c_str(), oldpath);
} else {
ldpath = new char[32+gConfDir.length()];
snprintf(ldpath, 32+gConfDir.length(), "DYLD_LIBRARY_PATH=%s/lib", gConfDir.c_str());
}
# else
if (getenv("LD_LIBRARY_PATH") && strlen(getenv("LD_LIBRARY_PATH")) > 0) {
ldpath = new char[32+gConfDir.length()+strlen(getenv("LD_LIBRARY_PATH"))];
snprintf(ldpath, 32+gConfDir.length()+strlen(getenv("LD_LIBRARY_PATH")),
"LD_LIBRARY_PATH=%s/lib:%s", gConfDir.c_str(), getenv("LD_LIBRARY_PATH"));
if ((oldpath = getenv("LD_LIBRARY_PATH")) && strlen(oldpath) > 0) {
ldpath = new char[32+gConfDir.length()+strlen(oldpath)];
snprintf(ldpath, 32+gConfDir.length()+strlen(oldpath),
"LD_LIBRARY_PATH=%s/lib:%s", gConfDir.c_str(), oldpath);
} else {
ldpath = new char[32+gConfDir.length()];
snprintf(ldpath, 32+gConfDir.length(), "LD_LIBRARY_PATH=%s/lib", gConfDir.c_str());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment