buf = g_base64_decode(vmdef->sec->data.sev_snp.host_data, &len);
if (len != host_data_len) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- _("Invalid host_data provided. Expected '%1$ld' bytes"),
+ _("Invalid host_data provided. Expected '%1$zu' bytes"),
host_data_len);
return -1;
}
g_autoptr(virJSONValue) nets = virJSONValueNewArray();
for (i = 0; i < vmdef->nnets; i++) {
g_autoptr(virJSONValue) net_json = virJSONValueNewObject();
- g_autofree char *id = g_strdup_printf("%s_%ld", CH_NET_ID_PREFIX, i);
+ g_autofree char *id = g_strdup_printf("%s_%zu", CH_NET_ID_PREFIX, i);
if (virJSONValueObjectAppendString(net_json, "id", id) < 0)
return -1;
if (virJSONValueObjectAppendNumberInt(net_json, "num_fds", vmdef->nets[i]->driver.virtio.queues))
VIR_DEBUG("payload sent with net-add request to CH = %s", payload);
virBufferAsprintf(&buf, "%s", virBufferCurrentContent(&http_headers));
- virBufferAsprintf(&buf, "Content-Length: %ld\r\n\r\n", strlen(payload));
+ virBufferAsprintf(&buf, "Content-Length: %zu\r\n\r\n", strlen(payload));
virBufferAsprintf(&buf, "%s", payload);
payload_len = virBufferUse(&buf);
payload = virBufferContentAndReset(&buf);
virBufferAddLit(&http_headers, "Host: localhost\r\n");
virBufferAddLit(&http_headers, "Content-Type: application/json\r\n");
virBufferAsprintf(&buf, "%s", virBufferCurrentContent(&http_headers));
- virBufferAsprintf(&buf, "Content-Length: %ld\r\n\r\n", strlen(payload));
+ virBufferAsprintf(&buf, "Content-Length: %zu\r\n\r\n", strlen(payload));
virBufferAsprintf(&buf, "%s", payload);
payload_len = virBufferUse(&buf);
payload = virBufferContentAndReset(&buf);