The following commit has been merged in the master branch:
commit ebe392c61526b520bb7033fa49af8bd2faa39001
Author: Guillem Jover <[email protected]>
Date: Mon Nov 1 21:01:05 2010 +0100
libdpkg: Switch tar_header_decode() to take a struct tar_header
Instead of passing it a 'char *' argument to be casted later on to a
tar_header, just pass the latter directly.
diff --git a/lib/dpkg/tarfn.c b/lib/dpkg/tarfn.c
index 55c0495..e7bccf7 100644
--- a/lib/dpkg/tarfn.c
+++ b/lib/dpkg/tarfn.c
@@ -183,9 +183,8 @@ tar_header_checksum(struct tar_header *h)
}
static int
-tar_header_decode(char *block, struct tar_entry *d)
+tar_header_decode(struct tar_header *h, struct tar_entry *d)
{
- struct tar_header *h = (struct tar_header *)block;
struct passwd *passwd = NULL;
struct group *group = NULL;
@@ -257,7 +256,7 @@ tar_extractor(void *ctx, const struct tar_operations *ops)
while ((status = ops->read(ctx, buffer, TARBLKSZ)) == TARBLKSZ) {
int name_len;
- if (!tar_header_decode(buffer, &h)) {
+ if (!tar_header_decode((struct tar_header *)buffer, &h)) {
if (h.name[0] == '\0') {
/* End of tape. */
status = 0;
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]