The variable size is already of type size_t. No need to cast it again
to size_t.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
const void *src;
/* Fail if we can't make our buffer big enough. */
- if (archive_string_ensure(as, (size_t)size+1) == NULL) {
+ if (archive_string_ensure(as, size + 1) == NULL) {
archive_set_error(&a->archive, ENOMEM,
"No memory");
return (ARCHIVE_FATAL);
*unconsumed = 0;
return (ARCHIVE_FATAL);
}
- memcpy(as->s, src, (size_t)size);
+ memcpy(as->s, src, size);
as->s[size] = '\0';
- as->length = (size_t)size;
+ as->length = size;
*unconsumed += size;
return (ARCHIVE_OK);
}