diff options
Diffstat (limited to 'archival/libunarchive/check_header_gzip.c')
-rw-r--r-- | archival/libunarchive/check_header_gzip.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/archival/libunarchive/check_header_gzip.c b/archival/libunarchive/check_header_gzip.c index d661df7cc..13832c240 100644 --- a/archival/libunarchive/check_header_gzip.c +++ b/archival/libunarchive/check_header_gzip.c | |||
@@ -15,11 +15,11 @@ extern void check_header_gzip(int src_fd) | |||
15 | } formated; | 15 | } formated; |
16 | } header; | 16 | } header; |
17 | 17 | ||
18 | xread_all(src_fd, header.raw, 8); | 18 | bb_xread_all(src_fd, header.raw, 8); |
19 | 19 | ||
20 | /* Check the compression method */ | 20 | /* Check the compression method */ |
21 | if (header.formated.method != 8) { | 21 | if (header.formated.method != 8) { |
22 | error_msg_and_die("Unknown compression method %d", | 22 | bb_error_msg_and_die("Unknown compression method %d", |
23 | header.formated.method); | 23 | header.formated.method); |
24 | } | 24 | } |
25 | 25 | ||
@@ -27,10 +27,10 @@ extern void check_header_gzip(int src_fd) | |||
27 | /* bit 2 set: extra field present */ | 27 | /* bit 2 set: extra field present */ |
28 | unsigned char extra_short; | 28 | unsigned char extra_short; |
29 | 29 | ||
30 | extra_short = xread_char(src_fd) + (xread_char(src_fd) << 8); | 30 | extra_short = bb_xread_char(src_fd) + (bb_xread_char(src_fd) << 8); |
31 | while (extra_short > 0) { | 31 | while (extra_short > 0) { |
32 | /* Ignore extra field */ | 32 | /* Ignore extra field */ |
33 | xread_char(src_fd); | 33 | bb_xread_char(src_fd); |
34 | extra_short--; | 34 | extra_short--; |
35 | } | 35 | } |
36 | } | 36 | } |
@@ -38,19 +38,19 @@ extern void check_header_gzip(int src_fd) | |||
38 | /* Discard original name if any */ | 38 | /* Discard original name if any */ |
39 | if (header.formated.flags & 0x08) { | 39 | if (header.formated.flags & 0x08) { |
40 | /* bit 3 set: original file name present */ | 40 | /* bit 3 set: original file name present */ |
41 | while(xread_char(src_fd) != 0); | 41 | while(bb_xread_char(src_fd) != 0); |
42 | } | 42 | } |
43 | 43 | ||
44 | /* Discard file comment if any */ | 44 | /* Discard file comment if any */ |
45 | if (header.formated.flags & 0x10) { | 45 | if (header.formated.flags & 0x10) { |
46 | /* bit 4 set: file comment present */ | 46 | /* bit 4 set: file comment present */ |
47 | while(xread_char(src_fd) != 0); | 47 | while(bb_xread_char(src_fd) != 0); |
48 | } | 48 | } |
49 | 49 | ||
50 | /* Read the header checksum */ | 50 | /* Read the header checksum */ |
51 | if (header.formated.flags & 0x02) { | 51 | if (header.formated.flags & 0x02) { |
52 | xread_char(src_fd); | 52 | bb_xread_char(src_fd); |
53 | xread_char(src_fd); | 53 | bb_xread_char(src_fd); |
54 | } | 54 | } |
55 | 55 | ||
56 | return; | 56 | return; |