Mute -Wstrlcpy-strlcat-size warning by using nitems with the size of the buffer
This is a no-op as the malloc above set the size of the buffer to the size used below, but this keeps things consistent in case the malloc call changes somehow. MFC after: 1 week Reported by: clang Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
22b898e4cf
commit
7cc1c16326
@ -774,7 +774,7 @@ snmp_import_object(struct snmp_toolinfo *snmptoolctx)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
strlcpy(string, nexttok, strlen(nexttok) + 1);
|
||||
strlcpy(string, nexttok, nitems(string));
|
||||
oid2str->string = string;
|
||||
oid2str->strlen = strlen(nexttok);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user