From 23c36c2d2c0d1ea85c1b638d71267c28522c08cd Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 3 Jan 2018 22:28:43 +0100 Subject: Display.c: drop helper variable in loop --- nx-X11/programs/Xserver/hw/nxagent/Display.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'nx-X11/programs/Xserver') 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 */ -- cgit v1.2.3