Use sizeof(*uuser)
instead of sizeof(struct usm_user)
for consistency with
the rest of the users in the file No functional change MFC after: 3 days Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
028d33c96a
commit
8ad8cdc95f
@ -2813,7 +2813,7 @@ usm_new_user(uint8_t *eid, uint32_t elen, char *uname)
|
|||||||
if ((uuser = (struct usm_user *)malloc(sizeof(*uuser))) == NULL)
|
if ((uuser = (struct usm_user *)malloc(sizeof(*uuser))) == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
memset(uuser, 0, sizeof(struct usm_user));
|
memset(uuser, 0, sizeof(*uuser));
|
||||||
strlcpy(uuser->suser.sec_name, uname, SNMP_ADM_STR32_SIZ);
|
strlcpy(uuser->suser.sec_name, uname, SNMP_ADM_STR32_SIZ);
|
||||||
memcpy(uuser->user_engine_id, eid, elen);
|
memcpy(uuser->user_engine_id, eid, elen);
|
||||||
uuser->user_engine_len = elen;
|
uuser->user_engine_len = elen;
|
||||||
|
Loading…
Reference in New Issue
Block a user