Commit 919e4fad authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Render.c: replace two while loops by shorter for loops

parent 39bf8d9d
...@@ -360,19 +360,15 @@ nxagentCleanGlyphs(xGlyphInfo *gi, ...@@ -360,19 +360,15 @@ nxagentCleanGlyphs(xGlyphInfo *gi,
if (bytesToClean > 0) if (bytesToClean > 0)
{ {
while (height > 0) for (; height > 0; height--)
{ {
int count = bytesToClean; for (int i = bytesToClean; i > 0; i--)
while (count > 0)
{ {
*(images + (bytesPerLine - count)) = 0; *(images + (bytesPerLine - i)) = 0;
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentCleanGlyphs: cleaned a byte.\n"); fprintf(stderr, "nxagentCleanGlyphs: cleaned a byte.\n");
#endif #endif
count--;
} }
#ifdef DUMP #ifdef DUMP
...@@ -385,8 +381,6 @@ nxagentCleanGlyphs(xGlyphInfo *gi, ...@@ -385,8 +381,6 @@ nxagentCleanGlyphs(xGlyphInfo *gi,
#endif #endif
images += bytesPerLine; images += bytesPerLine;
height--;
} }
} }
......
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