mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-30 21:47:18 +00:00
Fix some format specifiers for size_t vs ssize_t
A handful of places used %zd for format specifiers even though the args was size_t, not ssize_t. * src/remote/remote_driver.c, src/util/xml.c: s/%zd/%zu/ Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
814fcb9e08
commit
5d7929af46
@ -1839,7 +1839,7 @@ remoteDomainGetSecurityLabel (virDomainPtr domain, virSecurityLabelPtr seclabel)
|
|||||||
|
|
||||||
if (ret.label.label_val != NULL) {
|
if (ret.label.label_val != NULL) {
|
||||||
if (strlen (ret.label.label_val) >= sizeof seclabel->label) {
|
if (strlen (ret.label.label_val) >= sizeof seclabel->label) {
|
||||||
remoteError(VIR_ERR_RPC, _("security label exceeds maximum: %zd"),
|
remoteError(VIR_ERR_RPC, _("security label exceeds maximum: %zu"),
|
||||||
sizeof seclabel->label - 1);
|
sizeof seclabel->label - 1);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -1910,7 +1910,7 @@ remoteNodeGetSecurityModel (virConnectPtr conn, virSecurityModelPtr secmodel)
|
|||||||
|
|
||||||
if (ret.model.model_val != NULL) {
|
if (ret.model.model_val != NULL) {
|
||||||
if (strlen (ret.model.model_val) >= sizeof secmodel->model) {
|
if (strlen (ret.model.model_val) >= sizeof secmodel->model) {
|
||||||
remoteError(VIR_ERR_RPC, _("security model exceeds maximum: %zd"),
|
remoteError(VIR_ERR_RPC, _("security model exceeds maximum: %zu"),
|
||||||
sizeof secmodel->model - 1);
|
sizeof secmodel->model - 1);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@ -1919,7 +1919,7 @@ remoteNodeGetSecurityModel (virConnectPtr conn, virSecurityModelPtr secmodel)
|
|||||||
|
|
||||||
if (ret.doi.doi_val != NULL) {
|
if (ret.doi.doi_val != NULL) {
|
||||||
if (strlen (ret.doi.doi_val) >= sizeof secmodel->doi) {
|
if (strlen (ret.doi.doi_val) >= sizeof secmodel->doi) {
|
||||||
remoteError(VIR_ERR_RPC, _("security doi exceeds maximum: %zd"),
|
remoteError(VIR_ERR_RPC, _("security doi exceeds maximum: %zu"),
|
||||||
sizeof secmodel->doi - 1);
|
sizeof secmodel->doi - 1);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ virXPathStringLimit(const char *xpath,
|
|||||||
|
|
||||||
if (tmp != NULL && strlen(tmp) >= maxlen) {
|
if (tmp != NULL && strlen(tmp) >= maxlen) {
|
||||||
virXMLError(VIR_ERR_INTERNAL_ERROR,
|
virXMLError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("\'%s\' value longer than %zd bytes"),
|
_("\'%s\' value longer than %zu bytes"),
|
||||||
xpath, maxlen);
|
xpath, maxlen);
|
||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user