Commit 6d783bac authored by Ulrich Sibiller's avatar Ulrich Sibiller

Error.c: Code simplification

parent d94f4727
...@@ -434,7 +434,6 @@ char *nxagentGetRootPath(void) ...@@ -434,7 +434,6 @@ char *nxagentGetRootPath(void)
*/ */
struct stat dirStat; struct stat dirStat;
if ((stat(nxagentRootDir, &dirStat) == -1) && (errno == ENOENT)) if ((stat(nxagentRootDir, &dirStat) == -1) && (errno == ENOENT))
{ {
if (mkdir(nxagentRootDir, 0777) < 0 && (errno != EEXIST)) if (mkdir(nxagentRootDir, 0777) < 0 && (errno != EEXIST))
...@@ -530,7 +529,6 @@ char *nxagentGetSessionPath(void) ...@@ -530,7 +529,6 @@ char *nxagentGetSessionPath(void)
SAFE_free(rootPath); SAFE_free(rootPath);
struct stat dirStat; struct stat dirStat;
if ((stat(nxagentSessionDir, &dirStat) == -1) && (errno == ENOENT)) if ((stat(nxagentSessionDir, &dirStat) == -1) && (errno == ENOENT))
{ {
if (mkdir(nxagentSessionDir, 0777) < 0 && (errno != EEXIST)) if (mkdir(nxagentSessionDir, 0777) < 0 && (errno != EEXIST))
...@@ -567,7 +565,6 @@ char *nxagentGetSessionPath(void) ...@@ -567,7 +565,6 @@ char *nxagentGetSessionPath(void)
void nxagentGetClientsPath(void) void nxagentGetClientsPath(void)
{ {
if (*nxagentClientsLogName == '\0') if (*nxagentClientsLogName == '\0')
{ {
char *sessionPath = nxagentGetSessionPath(); char *sessionPath = nxagentGetSessionPath();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment