summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2012-02-17 18:17:49 -0500
committerMatt Turner <mattst88@gmail.com>2012-02-18 17:41:10 -0500
commitfced5c82c2f0d6d00cb8d0a30ce6a04ec196d274 (patch)
treecb5597d2da25228e3ab64f59ac3b8b118d45a9c8
parente27bdcd968e786079353432d14816600bf813d76 (diff)
Convert while (w) to if (w) when possible
Missed in commit 57fd8c37. Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--pixman/pixman-mmx.c14
-rw-r--r--pixman/pixman-sse2.c2
2 files changed, 8 insertions, 8 deletions
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index 937ce8f..6e6de5f 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -1360,7 +1360,7 @@ mmx_composite_over_n_8888_8888_ca (pixman_implementation_t *imp,
twidth -= 2;
}
- while (twidth)
+ if (twidth)
{
uint32_t m = *(uint32_t *)p;
@@ -1901,14 +1901,14 @@ pixman_fill_mmx (uint32_t *bits,
byte_line += stride;
w = byte_width;
- while (w >= 1 && ((unsigned long)d & 1))
+ if (w >= 1 && ((unsigned long)d & 1))
{
*(uint8_t *)d = (xor & 0xff);
w--;
d++;
}
- while (w >= 2 && ((unsigned long)d & 3))
+ if (w >= 2 && ((unsigned long)d & 3))
{
*(uint16_t *)d = xor;
w -= 2;
@@ -1961,13 +1961,13 @@ pixman_fill_mmx (uint32_t *bits,
w -= 4;
d += 4;
}
- while (w >= 2)
+ if (w >= 2)
{
*(uint16_t *)d = xor;
w -= 2;
d += 2;
}
- while (w >= 1)
+ if (w >= 1)
{
*(uint8_t *)d = (xor & 0xff);
w--;
@@ -2925,7 +2925,7 @@ pixman_blt_mmx (uint32_t *src_bits,
dst_bytes += dst_stride;
w = byte_width;
- while (w >= 1 && ((unsigned long)d & 1))
+ if (w >= 1 && ((unsigned long)d & 1))
{
*(uint8_t *)d = *(uint8_t *)s;
w -= 1;
@@ -2933,7 +2933,7 @@ pixman_blt_mmx (uint32_t *src_bits,
d += 1;
}
- while (w >= 2 && ((unsigned long)d & 3))
+ if (w >= 2 && ((unsigned long)d & 3))
{
*(uint16_t *)d = *(uint16_t *)s;
w -= 2;
diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c
index 8adf541..e217ca3 100644
--- a/pixman/pixman-sse2.c
+++ b/pixman/pixman-sse2.c
@@ -3291,7 +3291,7 @@ pixman_fill_sse2 (uint32_t *bits,
byte_line += stride;
w = byte_width;
- while (w >= 1 && ((unsigned long)d & 1))
+ if (w >= 1 && ((unsigned long)d & 1))
{
*(uint8_t *)d = data;
w -= 1;