diff options
author | kientzle <kientzle@FreeBSD.org> | 2007-04-05 05:20:13 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2007-04-05 05:20:13 +0000 |
commit | bf75e04a4eecdd158380fa0d26d71e71c6a54dc0 (patch) | |
tree | e1a175f6fb4308b2a10191612f2dd088af8389f5 /lib | |
parent | a9a30ff15d01cc1299e4e67bd314826799035ab7 (diff) | |
download | FreeBSD-src-bf75e04a4eecdd158380fa0d26d71e71c6a54dc0.zip FreeBSD-src-bf75e04a4eecdd158380fa0d26d71e71c6a54dc0.tar.gz |
Style fixes from Joerg Sonnenberger: use correct types,
spell lint(1) comments correctly.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libarchive/archive_entry.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/libarchive/archive_entry.c b/lib/libarchive/archive_entry.c index 2e51c6e..c498bc0 100644 --- a/lib/libarchive/archive_entry.c +++ b/lib/libarchive/archive_entry.c @@ -250,7 +250,8 @@ aes_get_mbs(struct aes *aes) * chars encode to no more than 3 bytes. There must * be a better way... XXX */ - int mbs_length = wcslen(aes->aes_wcs) * 3 + 64; + size_t mbs_length = wcslen(aes->aes_wcs) * 3 + 64; + aes->aes_mbs_alloc = (char *)malloc(mbs_length); aes->aes_mbs = aes->aes_mbs_alloc; if (aes->aes_mbs == NULL) @@ -271,7 +272,8 @@ aes_get_wcs(struct aes *aes) * No single byte will be more than one wide character, * so this length estimate will always be big enough. */ - int wcs_length = strlen(aes->aes_mbs); + size_t wcs_length = strlen(aes->aes_mbs); + aes->aes_wcs_alloc = (wchar_t *)malloc((wcs_length + 1) * sizeof(wchar_t)); aes->aes_wcs = aes->aes_wcs_alloc; @@ -1207,14 +1209,14 @@ append_entry_w(wchar_t **wp, const wchar_t *prefix, int tag, case ARCHIVE_ENTRY_ACL_USER_OBJ: wname = NULL; id = -1; - /* FALL THROUGH */ + /* FALLTHROUGH */ case ARCHIVE_ENTRY_ACL_USER: wcscpy(*wp, L"user"); break; case ARCHIVE_ENTRY_ACL_GROUP_OBJ: wname = NULL; id = -1; - /* FALL THROUGH */ + /* FALLTHROUGH */ case ARCHIVE_ENTRY_ACL_GROUP: wcscpy(*wp, L"group"); break; @@ -1648,7 +1650,7 @@ ae_fflagstostr(unsigned long bitset, unsigned long bitclear) const char *sp; unsigned long bits; struct flag *flag; - int length; + size_t length; bits = bitset | bitclear; length = 0; |