aboutsummaryrefslogtreecommitdiffstats
path: root/block-dmg.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-03 23:39:08 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2005-01-03 23:39:08 +0000
commit995179f1ccb9fbc88b5af70614e5ae22bf43e506 (patch)
tree7c3302796d27316a2713079f679e2ab734db95f5 /block-dmg.c
parent0b0babc623d1e6e0fe19a3b05a1f418edb65b371 (diff)
gcc 2.x fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1192 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-dmg.c')
-rw-r--r--block-dmg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block-dmg.c b/block-dmg.c
index af8b67b7a..582e3cb2f 100644
--- a/block-dmg.c
+++ b/block-dmg.c
@@ -109,10 +109,12 @@ dmg_close:
/* read offsets */
last_in_offset = last_out_offset = 0;
while(lseek(s->fd,0,SEEK_CUR)<info_end) {
+ uint32_t type;
+
count = read_uint32(s->fd);
if(count==0)
goto dmg_close;
- uint32_t type = read_uint32(s->fd);
+ type = read_uint32(s->fd);
if(type!=0x6d697368 || count<244)
lseek(s->fd,count-4,SEEK_CUR);
else {