aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2010-09-30 22:05:42 +0200
committerBlue Swirl <blauwirbel@gmail.com>2010-10-03 06:41:03 +0000
commitb832134d8ab6cb455bf182c99e5610803d8d2500 (patch)
treea2a0574207bb9833602a39316d7c3f0ec84f0a54 /hw
parenta4a77677d790c07759ae5219110de2e472a6b0a9 (diff)
rc4030: Fix compilation error in debug code
min was unknown here, so avoid it. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/rc4030.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/rc4030.c b/hw/rc4030.c
index 223137323b..abbc3eb4e2 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)