Index: branches/ariel/xmldumps-backup/findpageidinbz2xml.c |
— | — | @@ -133,7 +133,7 @@ |
134 | 134 | |
135 | 135 | bfile->bits_shifted = -1; |
136 | 136 | result = read(fin, bfile->marker_buffer, 7); |
137 | | - if (result < 0) { |
| 137 | + if (result == -1) { |
138 | 138 | /* fprintf(stderr,"read of file failed\n"); */ |
139 | 139 | return(-1); |
140 | 140 | } |
— | — | @@ -202,7 +202,7 @@ |
203 | 203 | int ret, res; |
204 | 204 | |
205 | 205 | res = lseek(fin,0,SEEK_SET); |
206 | | - if (res < 0) { |
| 206 | + if (res == -1) { |
207 | 207 | fprintf(stderr,"lseek of file to 0 failed (3)\n"); |
208 | 208 | exit(-1); |
209 | 209 | } |
— | — | @@ -242,14 +242,14 @@ |
243 | 243 | |
244 | 244 | if (bfile->bits_shifted == 0) { |
245 | 245 | res = lseek(fin,bfile->position+1,SEEK_SET); |
246 | | - if (res < 0) { |
| 246 | + if (res == -1) { |
247 | 247 | fprintf(stderr,"lseek of file to %ld failed (4)\n",(long int) bfile->position+1); |
248 | 248 | return(-1); |
249 | 249 | } |
250 | 250 | } |
251 | 251 | else { |
252 | 252 | res = lseek(fin,bfile->position,SEEK_SET); |
253 | | - if (res < 0) { |
| 253 | + if (res == -1) { |
254 | 254 | fprintf(stderr,"lseek of file to %ld failed (5)\n",(long int) bfile->position); |
255 | 255 | return(-1); |
256 | 256 | } |
— | — | @@ -356,7 +356,7 @@ |
357 | 357 | int res; |
358 | 358 | |
359 | 359 | res = lseek(fin, 0, SEEK_END); |
360 | | - if (res < 0) { |
| 360 | + if (res == -1) { |
361 | 361 | fprintf(stderr,"lseek of file to 0 failed (6)\n"); |
362 | 362 | exit(-1); |
363 | 363 | } |
— | — | @@ -394,7 +394,7 @@ |
395 | 395 | return(-1); |
396 | 396 | } |
397 | 397 | res = lseek(fin, bfile->position, SEEK_SET); |
398 | | - if (res < 0) { |
| 398 | + if (res == -1) { |
399 | 399 | fprintf(stderr,"lseek of file to %ld failed (7)\n",(long int) bfile->position); |
400 | 400 | exit(-1); |
401 | 401 | } |
— | — | @@ -418,7 +418,7 @@ |
419 | 419 | bfile->eof = 0; |
420 | 420 | /* leave the file at the right position */ |
421 | 421 | res = lseek(fin, bfile->block_start, SEEK_SET); |
422 | | - if (res < 0) { |
| 422 | + if (res == -1) { |
423 | 423 | fprintf(stderr,"lseek of file to %ld failed (7)\n",(long int) bfile->position); |
424 | 424 | exit(-1); |
425 | 425 | } |