iovec-wrapper: make iovw_size() take NULL again
This partially reverts 267b16f33c.
We usually make xyz_size() take NULL, e.g. hashmap_size().
This commit is contained in:
@@ -237,7 +237,8 @@ void iovw_rebase(struct iovec_wrapper *iovw, void *old, void *new) {
|
||||
}
|
||||
|
||||
size_t iovw_size(const struct iovec_wrapper *iovw) {
|
||||
assert(iovw);
|
||||
if (iovw_isempty(iovw))
|
||||
return 0;
|
||||
|
||||
return iovec_total_size(iovw->iovec, iovw->count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user