aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Display.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Display.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index 31efab8c3..4f2e3c6d8 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -1834,9 +1834,9 @@ static FILE *nxagentLookForIconFile(char *iconName, const char *permission,
return NULL;
}
- for (int breakLoop = False; breakLoop == False && fptr == NULL; )
+ for (char *end = path; end != NULL && fptr == NULL; )
{
- char *end = strchr(path, separator);
+ end = strchr(path, separator);
/* separator found */
if (end != NULL)
@@ -1860,8 +1860,6 @@ static FILE *nxagentLookForIconFile(char *iconName, const char *permission,
}
snprintf(singlePath, sizeof(singlePath), "%s", path);
-
- breakLoop = True;
}
/* cut off trailing slashes, if any */