summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-03-06 06:14:44 +0000
committerkientzle <kientzle@FreeBSD.org>2009-03-06 06:14:44 +0000
commit28029139153edbfa691205ff8c4cc4fbc62b119f (patch)
tree3ff8ad64b4ac9f234e24f4835e73e6bd9a6e265d /lib
parent3de75120b94ae8adefacf4c21c522de03879132e (diff)
downloadFreeBSD-src-28029139153edbfa691205ff8c4cc4fbc62b119f.zip
FreeBSD-src-28029139153edbfa691205ff8c4cc4fbc62b119f.tar.gz
Merge r668 from libarchive.googlecode.com: Style correction to the
'ar' reader: Don't redefine 'isdigit' and don't create a macro that's only used once.
Diffstat (limited to 'lib')
-rw-r--r--lib/libarchive/archive_read_support_format_ar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libarchive/archive_read_support_format_ar.c b/lib/libarchive/archive_read_support_format_ar.c
index 3bd13b1..0992b27 100644
--- a/lib/libarchive/archive_read_support_format_ar.c
+++ b/lib/libarchive/archive_read_support_format_ar.c
@@ -72,8 +72,6 @@ struct ar {
#define AR_fmag_offset 58
#define AR_fmag_size 2
-#define isdigit(x) (x) >= '0' && (x) <= '9'
-
static int archive_read_format_ar_bid(struct archive_read *a);
static int archive_read_format_ar_cleanup(struct archive_read *a);
static int archive_read_format_ar_read_data(struct archive_read *a,
@@ -309,8 +307,10 @@ archive_read_format_ar_read_header(struct archive_read *a,
/*
* GNU variant handles long filenames by storing /<number>
* to indicate a name stored in the filename table.
+ * XXX TODO: Verify that it's all digits... Don't be fooled
+ * by "/9xyz" XXX
*/
- if (filename[0] == '/' && isdigit(filename[1])) {
+ if (filename[0] == '/' && filename[1] >= '0' && filename[1] <= '9') {
number = ar_atol10(h + AR_name_offset + 1, AR_name_size - 1);
/*
* If we can't look up the real name, warn and return
OpenPOWER on IntegriCloud