summaryrefslogtreecommitdiff
path: root/archival/libunarchive/get_header_ar.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-10-08 12:49:22 +0000
committerDenis Vlasenko2006-10-08 12:49:22 +0000
commit1385899416a4396385ad421ae1f532be7103738a (patch)
treefc4d14a910593d1235318bb36abe5e9f72d2039e /archival/libunarchive/get_header_ar.c
parent5625415085e68ac5e150f54e685417c866620d76 (diff)
downloadbusybox-1385899416a4396385ad421ae1f532be7103738a.zip
busybox-1385899416a4396385ad421ae1f532be7103738a.tar.gz
attempt to regularize atoi mess.
Diffstat (limited to 'archival/libunarchive/get_header_ar.c')
-rw-r--r--archival/libunarchive/get_header_ar.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/archival/libunarchive/get_header_ar.c b/archival/libunarchive/get_header_ar.c
index cabb410..7372ada 100644
--- a/archival/libunarchive/get_header_ar.c
+++ b/archival/libunarchive/get_header_ar.c
@@ -46,14 +46,14 @@ char get_header_ar(archive_handle_t *archive_handle)
/* align the headers based on the header magic */
if ((ar.formatted.magic[0] != '`') || (ar.formatted.magic[1] != '\n')) {
- bb_error_msg_and_die("Invalid ar header");
+ bb_error_msg_and_die("invalid ar header");
}
- typed->mode = strtol(ar.formatted.mode, NULL, 8);
- typed->mtime = atoi(ar.formatted.date);
- typed->uid = atoi(ar.formatted.uid);
- typed->gid = atoi(ar.formatted.gid);
- typed->size = atoi(ar.formatted.size);
+ typed->mode = xstrtoul(ar.formatted.mode, 8);
+ typed->mtime = xatou(ar.formatted.date);
+ typed->uid = xatou(ar.formatted.uid);
+ typed->gid = xatou(ar.formatted.gid);
+ typed->size = xatoul(ar.formatted.size);
/* long filenames have '/' as the first character */
if (ar.formatted.name[0] == '/') {