mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
vlserver: Use correct memsets in vlentry convertor
The various vlentry_to_<blah> conversion functions have obviously been copy and pasted from each other. However, the size of the structure which is being zeroed has not been updated when we are zeroing different structures. Fix this, so that we always clear all of the structure that we are filling. Change-Id: Ic822e1d2b17494574074c332c7680e94d4701c66 Reviewed-on: http://gerrit.openafs.org/4773 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
41dc2509ba
commit
90507fcb10
@ -3060,7 +3060,7 @@ vlentry_to_nvldbentry(struct vl_ctx *ctx, struct nvlentry *VlEntry,
|
||||
{
|
||||
int i, j;
|
||||
|
||||
memset(VldbEntry, 0, sizeof(struct vldbentry));
|
||||
memset(VldbEntry, 0, sizeof(struct nvldbentry));
|
||||
strncpy(VldbEntry->name, VlEntry->name, sizeof(VldbEntry->name));
|
||||
for (i = 0; i < NMAXNSERVERS; i++) {
|
||||
if (VlEntry->serverNumber[i] == BADSERVERID)
|
||||
@ -3099,7 +3099,7 @@ vlentry_to_uvldbentry(struct vl_ctx *ctx, struct nvlentry *VlEntry,
|
||||
{
|
||||
int i, j;
|
||||
|
||||
memset(VldbEntry, 0, sizeof(struct vldbentry));
|
||||
memset(VldbEntry, 0, sizeof(struct uvldbentry));
|
||||
strncpy(VldbEntry->name, VlEntry->name, sizeof(VldbEntry->name));
|
||||
for (i = 0; i < NMAXNSERVERS; i++) {
|
||||
if (VlEntry->serverNumber[i] == BADSERVERID)
|
||||
|
Loading…
Reference in New Issue
Block a user