Merge pull request #15248 from LabNConsulting/chopps/fix-comp-warning

zebra: fix compiler warning about truncation.
This commit is contained in:
Igor Ryzhov 2024-01-29 20:52:00 +02:00 committed by GitHub
commit bb957e4c94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -230,11 +230,12 @@ DEFUN_YANG_NOSH (link_params,
ret = nb_cli_apply_changes(vty, NULL);
if (ret == CMD_SUCCESS) {
char xpath[XPATH_MAXLEN];
char *xpath;
snprintf(xpath, sizeof(xpath), "%s/frr-zebra:zebra/link-params",
VTY_CURR_XPATH);
xpath = asprintfrr(MTYPE_TMP, "%s/frr-zebra:zebra/link-params",
VTY_CURR_XPATH);
VTY_PUSH_XPATH(LINK_PARAMS_NODE, xpath);
XFREE(MTYPE_TMP, xpath);
}
return ret;