[Pixman] [PATCH] Convert while (w) to if (w) when possible
Matt Turner
mattst88 at gmail.com
Fri Feb 17 15:18:37 PST 2012
Missed in commit 57fd8c37.
Signed-off-by: Matt Turner <mattst88 at gmail.com>
---
pixman/pixman-mmx.c | 4 ++--
pixman/pixman-sse2.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
index 937ce8f..82f6b54 100644
--- a/pixman/pixman-mmx.c
+++ b/pixman/pixman-mmx.c
@@ -1901,7 +1901,7 @@ 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--;
@@ -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;
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;
--
1.7.3.4
More information about the Pixman
mailing list