diff mbox

[v2,06/13] Use unsigned types for the 'len' argument of all memory read/write functions

Message ID 1456847859-4771-6-git-send-email-martin.galvan@tallertechnologies.com (mailing list archive)
State New, archived
Headers show

Commit Message

Martin Galvan March 1, 2016, 3:57 p.m. UTC
---
 hw/audio/marvell_88w8618.c | 2 +-
 hw/audio/milkymist-ac97.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

--
2.7.1
diff mbox

Patch

diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c
index a6ca180..c4edf99 100644
--- a/hw/audio/marvell_88w8618.c
+++ b/hw/audio/marvell_88w8618.c
@@ -64,7 +64,7 @@  static void mv88w8618_audio_callback(void *opaque, int free_out, int free_in)
     int16_t *codec_buffer;
     int8_t buf[4096];
     int8_t *mem_buffer;
-    int pos, block_size;
+    size_t pos, block_size;

     if (!(s->playback_mode & MP_AUDIO_PLAYBACK_EN)) {
         return;
diff --git a/hw/audio/milkymist-ac97.c b/hw/audio/milkymist-ac97.c
index 6a3b536..67639c6 100644
--- a/hw/audio/milkymist-ac97.c
+++ b/hw/audio/milkymist-ac97.c
@@ -195,7 +195,7 @@  static void ac97_in_cb(void *opaque, int avail_b)
     }

     while (temp) {
-        int acquired, to_copy;
+        size_t acquired, to_copy;

         to_copy = audio_MIN(temp, sizeof(buf));
         acquired = AUD_read(s->voice_in, buf, to_copy);
@@ -238,7 +238,7 @@  static void ac97_out_cb(void *opaque, int free_b)
     }

     while (temp) {
-        int copied, to_copy;
+        size_t copied, to_copy;

         to_copy = audio_MIN(temp, sizeof(buf));
         cpu_physical_memory_read(addr, buf, to_copy);