Commit 995179f1ccb9fbc88b5af70614e5ae22bf43e506

Authored by bellard
1 parent 0b0babc6

gcc 2.x fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1192 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 1 deletions
block-dmg.c
@@ -109,10 +109,12 @@ dmg_close: @@ -109,10 +109,12 @@ dmg_close:
109 /* read offsets */ 109 /* read offsets */
110 last_in_offset = last_out_offset = 0; 110 last_in_offset = last_out_offset = 0;
111 while(lseek(s->fd,0,SEEK_CUR)<info_end) { 111 while(lseek(s->fd,0,SEEK_CUR)<info_end) {
  112 + uint32_t type;
  113 +
112 count = read_uint32(s->fd); 114 count = read_uint32(s->fd);
113 if(count==0) 115 if(count==0)
114 goto dmg_close; 116 goto dmg_close;
115 - uint32_t type = read_uint32(s->fd); 117 + type = read_uint32(s->fd);
116 if(type!=0x6d697368 || count<244) 118 if(type!=0x6d697368 || count<244)
117 lseek(s->fd,count-4,SEEK_CUR); 119 lseek(s->fd,count-4,SEEK_CUR);
118 else { 120 else {