diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 8df690b6fda047f8ab000533b589da129c9b98de..30ca6a577018e72e82a69c387d65dad466dd92aa 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -1839,7 +1839,7 @@ remoteDomainGetSecurityLabel (virDomainPtr domain, virSecurityLabelPtr seclabel) if (ret.label.label_val != NULL) { 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); goto cleanup; } @@ -1910,7 +1910,7 @@ remoteNodeGetSecurityModel (virConnectPtr conn, virSecurityModelPtr secmodel) if (ret.model.model_val != NULL) { 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); goto cleanup; } @@ -1919,7 +1919,7 @@ remoteNodeGetSecurityModel (virConnectPtr conn, virSecurityModelPtr secmodel) if (ret.doi.doi_val != NULL) { 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); goto cleanup; } diff --git a/src/util/xml.c b/src/util/xml.c index 1e0a48a64f299adeda29a3dfbac0da9ba6e2c840..79a9d2781e517cff7cf8a94a04885d5145288aa1 100644 --- a/src/util/xml.c +++ b/src/util/xml.c @@ -107,7 +107,7 @@ virXPathStringLimit(const char *xpath, if (tmp != NULL && strlen(tmp) >= maxlen) { virXMLError(VIR_ERR_INTERNAL_ERROR, - _("\'%s\' value longer than %zd bytes"), + _("\'%s\' value longer than %zu bytes"), xpath, maxlen); VIR_FREE(tmp); return NULL;