diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-14 22:08:53 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-14 22:08:53 +0000 |
commit | 650a0459b87314fc412dc81a2a863fefb969ca37 (patch) | |
tree | 859f73e5644ef22a804a58537c95228fca0b266b | |
parent | 16c7fb7fc5ae647bcc273827f507d90866419560 (diff) | |
download | busybox-650a0459b87314fc412dc81a2a863fefb969ca37.tar.gz |
get_header_ar: reformatted code, no real changes
-rw-r--r-- | archival/libunarchive/get_header_ar.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/archival/libunarchive/get_header_ar.c b/archival/libunarchive/get_header_ar.c index 4e294b2c0..a8a595e08 100644 --- a/archival/libunarchive/get_header_ar.c +++ b/archival/libunarchive/get_header_ar.c @@ -66,7 +66,9 @@ char get_header_ar(archive_handle_t *archive_handle) /* long filenames have '/' as the first character */ if (ar.formatted.name[0] == '/') { -#ifdef CONFIG_FEATURE_AR_LONG_FILENAMES + unsigned long_offset; + +#if ENABLE_FEATURE_AR_LONG_FILENAMES if (ar.formatted.name[1] == '/') { /* If the second char is a '/' then this entries data section * stores long filename for multiple entries, they are stored @@ -78,20 +80,22 @@ char get_header_ar(archive_handle_t *archive_handle) /* This ar entries data section only contained filenames for other records * they are stored in the static ar_long_names for future reference */ return get_header_ar(archive_handle); /* Return next header */ - } else if (ar.formatted.name[1] == ' ') { + } + + if (ar.formatted.name[1] == ' ') { /* This is the index of symbols in the file for compilers */ data_skip(archive_handle); archive_handle->offset += typed->size; return get_header_ar(archive_handle); /* Return next header */ - } else { - /* The number after the '/' indicates the offset in the ar data section - (saved in variable long_name) that conatains the real filename */ - const unsigned int long_offset = atoi(&ar.formatted.name[1]); - if (long_offset >= ar_long_name_size) { - bb_error_msg_and_die("can't resolve long filename"); - } - typed->name = xstrdup(ar_long_names + long_offset); } + + /* The number after the '/' indicates the offset in the ar data section + * (saved in variable long_name) that conatains the real filename */ + long_offset = atoi(&ar.formatted.name[1]); + if (long_offset >= ar_long_name_size) { + bb_error_msg_and_die("can't resolve long filename"); + } + typed->name = xstrdup(ar_long_names + long_offset); #else bb_error_msg_and_die("long filenames not supported"); #endif |