diff options
author | kientzle <kientzle@FreeBSD.org> | 2007-04-05 05:18:16 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2007-04-05 05:18:16 +0000 |
commit | a9a30ff15d01cc1299e4e67bd314826799035ab7 (patch) | |
tree | d2f3a4d09ef261b5cccfa37f06374220c7b202fd /lib/libarchive/archive_read_support_compression_none.c | |
parent | 1026a1bd3a2736bfc476a427ec93683a652173f4 (diff) | |
download | FreeBSD-src-a9a30ff15d01cc1299e4e67bd314826799035ab7.zip FreeBSD-src-a9a30ff15d01cc1299e4e67bd314826799035ab7.tar.gz |
From Joerg Sonnenberger: Fix a number of style gaffes,
including type puns and avoidable casts.
Diffstat (limited to 'lib/libarchive/archive_read_support_compression_none.c')
-rw-r--r-- | lib/libarchive/archive_read_support_compression_none.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libarchive/archive_read_support_compression_none.c b/lib/libarchive/archive_read_support_compression_none.c index 72328a3..1c8c6e3 100644 --- a/lib/libarchive/archive_read_support_compression_none.c +++ b/lib/libarchive/archive_read_support_compression_none.c @@ -51,7 +51,7 @@ struct archive_decompress_none { size_t buffer_size; char *next; /* Current read location. */ size_t avail; /* Bytes in my buffer. */ - const char *client_buff; /* Client buffer information. */ + const void *client_buff; /* Client buffer information. */ size_t client_total; const char *client_next; size_t client_avail; @@ -130,7 +130,7 @@ archive_decompressor_none_init(struct archive_read *a, const void *buff, size_t } /* Save reference to first block of data. */ - state->client_buff = (const char *)buff; + state->client_buff = buff; state->client_total = n; state->client_next = state->client_buff; state->client_avail = state->client_total; @@ -219,8 +219,7 @@ archive_decompressor_none_read_ahead(struct archive_read *a, const void **buff, * aren't, hence the cast. */ bytes_read = (a->client_reader)(&a->archive, - a->client_data, - (const void **)&state->client_buff); + a->client_data, &state->client_buff); if (bytes_read < 0) { /* Read error. */ state->client_total = state->client_avail = 0; state->client_next = state->client_buff = NULL; |