Author: Guillem Jover <guillem@debian.org>

---
 qemu/system_qemu.c |   18 ++++++++++++++----
 src/system.c       |   18 ++++++++++++++----
 2 files changed, 28 insertions(+), 8 deletions(-)

--- a/src/system.c
+++ b/src/system.c
@@ -515,11 +515,18 @@ void *mem_zalloc(struct mem *t, int size
  * Library functions
  */
 void bzero(void *s, int len) {
-	while (len--) *((char *)s)++ = 0;
+	while (len--) {
+		*(char *)s = 0;
+		s++;
+	}
 }
 
 void bcopy(const void *f, void *t, int len) {
-	while (len--) *((char *)t)++ = *((char *)f)++;
+	while (len--) {
+		*(char *)t = *(char *)f;
+		f++;
+		t++;
+	}
 }
 
 /* Comparison is 7-bit */
@@ -529,8 +536,11 @@ int bcmp(const void *s1, const void *s2,
 	char ch;
 
 	while (len--) {
-		ch = *((char *)s1)++;
-		if ((i = ch - *((char *)s2)++) != 0)
+		ch = *(char *)s1;
+		i = ch - *(char *)s2;
+		s1++;
+		s2++;
+		if (i != 0)
 			return i;
 		if (ch == 0)
 			return 0;
--- a/qemu/system_qemu.c
+++ b/qemu/system_qemu.c
@@ -332,11 +332,18 @@ void *mem_zalloc(struct mem *t, int size
  * Library functions
  */
 void bzero(void *s, int len) {
-	while (len--) *((char *)s)++ = 0;
+	while (len--) {
+		*(char *)s = 0;
+		s++;
+	}
 }
 
 void bcopy(const void *f, void *t, int len) {
-	while (len--) *((char *)t)++ = *((char *)f)++;
+	while (len--) {
+		*(char *)t = *(char *)f;
+		f++;
+		t++;
+	}
 }
 
 /* Comparison is 7-bit */
@@ -346,8 +353,11 @@ int bcmp(const void *s1, const void *s2,
 	char ch;
 
 	while (len--) {
-		ch = *((char *)s1)++;
-		if ((i = ch - *((char *)s2)++) != 0)
+		ch = *(char *)s1;
+		i = ch - *(char *)s2;
+		s1++;
+		s2++;
+		if (i != 0)
 			return i;
 		if (ch == 0)
 			return 0;
