]> git.ipfire.org Git - thirdparty/qemu.git/commit
dmg: use appropriate types when reading chunks
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 26 Mar 2014 12:05:57 +0000 (13:05 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 3 Jul 2014 21:18:13 +0000 (16:18 -0500)
commit4b50bd735711928869f14824481ac2cbda5333d5
tree158fcf0e7f4b83576d0e847c07ceb9a739718e1f
parent4ee5b9c8cbe05d1865924dce226b4c3aedc4dae6
dmg: use appropriate types when reading chunks

Use the right types instead of signed int:

  size_t new_size;

  This is a byte count for g_realloc() that is calculated from uint32_t
  and size_t values.

  uint32_t chunk_count;

  Use the same type as s->n_chunks, which is used together with
  chunk_count.

This patch is a cleanup and does not fix bugs.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit eb71803b041f55779ea10d860c0f66df285c68de)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/dmg.c