memset(a, 0, sizeof(a)) is rarely correct, unless a is an error. Use the
size of the destination structure, rather than the size of a pointer to it
when deciding how much memory to clear.
Caught by clang's new error messages
Change-Id: Ia6c566534efae2f67f1b9bd22198d352238a987c
Reviewed-on: http://gerrit.openafs.org/7076
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
* user from seeing stale data from a previous call
*/
- memset(dest, 0, sizeof(dest));
+ memset(dest, 0, sizeof(*dest));
switch (source->status) {
case VOK: