[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] rc4030: Fix compilation error in debug code
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [PATCH] rc4030: Fix compilation error in debug code |
Date: |
Thu, 30 Sep 2010 22:05:42 +0200 |
min was unknown here, so avoid it.
Cc: Blue Swirl <address@hidden>
Signed-off-by: Stefan Weil <address@hidden>
---
hw/rc4030.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/hw/rc4030.c b/hw/rc4030.c
index 2231373..abbc3eb 100644
--- a/hw/rc4030.c
+++ b/hw/rc4030.c
@@ -749,7 +749,10 @@ static void rc4030_do_dma(void *opaque, int n, uint8_t
*buf, int len, int is_wri
printf("rc4030 dma: Copying %d bytes %s host %p\n",
len, is_write ? "from" : "to", buf);
for (i = 0; i < len; i += 16) {
- int n = min(16, len - i);
+ int n = 16;
+ if (n > len - i) {
+ n = len - i;
+ }
for (j = 0; j < n; j++)
printf("%02x ", buf[i + j]);
while (j++ < 16)
--
1.7.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] rc4030: Fix compilation error in debug code,
Stefan Weil <=