aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-01-09 00:29:03 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-05-07 12:55:04 +0200
commit919e4fad30fef7efaa8e80885e8caaa3561284aa (patch)
tree75e4edbb7a28eda34ba436fc9fd135cf8c0d7d8e
parent39bf8d9d723c7e1fe39694e9d0da164692bcbdf9 (diff)
downloadnx-libs-919e4fad30fef7efaa8e80885e8caaa3561284aa.tar.gz
nx-libs-919e4fad30fef7efaa8e80885e8caaa3561284aa.tar.bz2
nx-libs-919e4fad30fef7efaa8e80885e8caaa3561284aa.zip
Render.c: replace two while loops by shorter for loops
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Render.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c
index 673b7114f..8bbff5f5e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Render.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c
@@ -360,19 +360,15 @@ nxagentCleanGlyphs(xGlyphInfo *gi,
if (bytesToClean > 0)
{
- while (height > 0)
+ for (; height > 0; height--)
{
- int count = bytesToClean;
-
- while (count > 0)
+ for (int i = bytesToClean; i > 0; i--)
{
- *(images + (bytesPerLine - count)) = 0;
+ *(images + (bytesPerLine - i)) = 0;
#ifdef DEBUG
fprintf(stderr, "nxagentCleanGlyphs: cleaned a byte.\n");
#endif
-
- count--;
}
#ifdef DUMP
@@ -385,8 +381,6 @@ nxagentCleanGlyphs(xGlyphInfo *gi,
#endif
images += bytesPerLine;
-
- height--;
}
}