- vdpa: support vdpa device migrate - vdpa: support vdpa device hot plug/unplug - vdpa: Introduce the new device type vdpa to hostdev - node_device: fix leak of DIR* - Include vdpa devices in node device list - lxc: fix lxcContainerMountAllFS() DEREF_BEFORE_CHECK - qemu: Return perf status that affect next boot for shutoff domains While we set up perf events for a shutoff domain and check the settings, All of perf events are reported as 'disabled', unless we add --config, This is redundant for a shutoff domain. - tests: upstream Fixing compiler warning in cputest - qemu_migration_cookie: Rename ret in qemuDomainExtractTLSSubject - virrandom: Fix printf format string in virRandomGenerateWWN() - fix the issue of errors when saving after 'virsh edit' - Use (un)signed printf specifiers correctly - admin: fix leak of typed parameters on error - esx: call freeaddrinfo earlier in esxUtil_ResolveHostname Call freeaddrinfo() as soon as @result is not needed anymore, i.e. right after getnameinfo(); this avoids calling freeaddrinfo() in two branches. - qemu: Fix incorrect command name in error messages Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
67 lines
2.2 KiB
Diff
67 lines
2.2 KiB
Diff
From b054dea7aa794414e7245721178937ab989596b2 Mon Sep 17 00:00:00 2001
|
|
From: wangjinlei <wangjinlei_yewu@cmss.chinamobile.com>
|
|
Date: Tue, 29 Aug 2023 19:30:40 +0800
|
|
Subject: [PATCH] qemu_migration_cookie: Rename ret in
|
|
qemuDomainExtractTLSSubject
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
We use 'ret' for storing values to be returned from a function. Return
|
|
values from called functions that are not supposed to be returned
|
|
further are usually called 'rv' (or 'rc').
|
|
|
|
upstream commit: d116f187c69c3eefa9bfeafaf7242009f2adf531
|
|
|
|
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
---
|
|
src/qemu/qemu_migration_cookie.c | 14 +++++++-------
|
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
|
|
index 1d88ac1d22..0a0ac11d88 100644
|
|
--- a/src/qemu/qemu_migration_cookie.c
|
|
+++ b/src/qemu/qemu_migration_cookie.c
|
|
@@ -138,7 +138,7 @@ qemuDomainExtractTLSSubject(const char *certdir)
|
|
char *pemdata = NULL;
|
|
gnutls_datum_t pemdatum;
|
|
gnutls_x509_crt_t cert;
|
|
- int ret;
|
|
+ int rc;
|
|
size_t subjectlen;
|
|
|
|
certfile = g_strdup_printf("%s/server-cert.pem", certdir);
|
|
@@ -149,22 +149,22 @@ qemuDomainExtractTLSSubject(const char *certdir)
|
|
goto error;
|
|
}
|
|
|
|
- ret = gnutls_x509_crt_init(&cert);
|
|
- if (ret < 0) {
|
|
+ rc = gnutls_x509_crt_init(&cert);
|
|
+ if (rc < 0) {
|
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
_("cannot initialize cert object: %s"),
|
|
- gnutls_strerror(ret));
|
|
+ gnutls_strerror(rc));
|
|
goto error;
|
|
}
|
|
|
|
pemdatum.data = (unsigned char *)pemdata;
|
|
pemdatum.size = strlen(pemdata);
|
|
|
|
- ret = gnutls_x509_crt_import(cert, &pemdatum, GNUTLS_X509_FMT_PEM);
|
|
- if (ret < 0) {
|
|
+ rc = gnutls_x509_crt_import(cert, &pemdatum, GNUTLS_X509_FMT_PEM);
|
|
+ if (rc < 0) {
|
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
_("cannot load cert data from %s: %s"),
|
|
- certfile, gnutls_strerror(ret));
|
|
+ certfile, gnutls_strerror(rc));
|
|
goto error;
|
|
}
|
|
|
|
--
|
|
2.27.0
|
|
|