From nobody Tue May 13 16:00:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 153872715206640.339108667917344; Fri, 5 Oct 2018 01:12:32 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E914481101; Fri, 5 Oct 2018 08:12:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9C4375C22B; Fri, 5 Oct 2018 08:12:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 41C943D38C; Fri, 5 Oct 2018 08:12:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w958CBDO009481 for ; Fri, 5 Oct 2018 04:12:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 166545D9CB; Fri, 5 Oct 2018 08:12:11 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0BA695D9CA for ; Fri, 5 Oct 2018 08:12:08 +0000 (UTC) Received: from m97138.mail.qiye.163.com (m97138.mail.qiye.163.com [220.181.97.138]) by mx1.redhat.com (Postfix) with ESMTP id 110E88764F for ; Fri, 5 Oct 2018 08:12:06 +0000 (UTC) Received: from localhost.localdomain (unknown [58.56.27.130]) by smtp9 (Coremail) with SMTP id u+CowAB3p3_PHLdb0blTAg--.62652S20; Fri, 05 Oct 2018 16:12:03 +0800 (CST) From: Shi Lei To: libvir-list@redhat.com Date: Fri, 5 Oct 2018 16:11:41 +0800 Message-Id: <20181005081145.29901-19-shi_lei@massclouds.com> In-Reply-To: <20181005081145.29901-1-shi_lei@massclouds.com> References: <20181005081145.29901-1-shi_lei@massclouds.com> X-CM-TRANSID: u+CowAB3p3_PHLdb0blTAg--.62652S20 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjTRP3kZUUUUU X-Originating-IP: [58.56.27.130] X-CM-SenderInfo: pvklsz1hl6ztxvvfz0xxgvhudrp/1tbifBTWT1rpNuEgzgAAs7 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 05 Oct 2018 08:12:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 05 Oct 2018 08:12:07 +0000 (UTC) for IP:'220.181.97.138' DOMAIN:'m97138.mail.qiye.163.com' HELO:'m97138.mail.qiye.163.com' FROM:'shi_lei@massclouds.com' RCPT:'' X-RedHat-Spam-Score: -0.01 (RCVD_IN_DNSWL_NONE) 220.181.97.138 m97138.mail.qiye.163.com 220.181.97.138 m97138.mail.qiye.163.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 18/22] xenapi: Fix misaligned arguments X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 05 Oct 2018 08:12:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch fixes misaligned arguments. Signed-off-by: Shi Lei --- src/xenapi/xenapi_utils.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/xenapi/xenapi_utils.c b/src/xenapi/xenapi_utils.c index 723f348..fee63c9 100644 --- a/src/xenapi/xenapi_utils.c +++ b/src/xenapi/xenapi_utils.c @@ -56,7 +56,7 @@ xenSessionFree(xen_session *session) =20 char * xenapiUtil_RequestPassword(virConnectAuthPtr auth, const char *username, - const char *hostname) + const char *hostname) { unsigned int ncred; virConnectCredential cred; @@ -107,7 +107,8 @@ xenapiUtil_ParseQuery(virConnectPtr conn, virURIPtr uri= , int *noVerify) if (virStrToLong_i(queryParam->value, NULL, 10, noVerify) < 0 = || (*noVerify !=3D 0 && *noVerify !=3D 1)) { xenapiSessionErrorHandler(conn, VIR_ERR_INVALID_ARG, - _("Query parameter 'no_verify' has unexpected value (should be 0 or = 1)")); + _("Query parameter 'no_verify' h= as " + "unexpected value (should be 0= or 1)")); goto failure; } } @@ -344,8 +345,9 @@ allocStringMap(xen_string_string_map **strings, char *k= ey, char *val) { int sz =3D ((*strings) =3D=3D NULL) ? 0 : (*strings)->size; sz++; - if (VIR_REALLOC_N(*strings, sizeof(xen_string_string_map) + - sizeof(xen_string_string_map_contents) * s= z) < 0) + if (VIR_REALLOC_N(*strings, + (sizeof(xen_string_string_map) + + sizeof(xen_string_string_map_contents) * sz)) < 0) return -1; (*strings)->size =3D sz; if (VIR_STRDUP((*strings)->contents[sz-1].key, key) < 0 || @@ -532,7 +534,7 @@ createVMRecordFromXml(virConnectPtr conn, virDomainDefP= tr def, (*record)->xenstore_data =3D xen_string_string_map_alloc(0); (*record)->hvm_shadow_multiplier =3D 1.000; if (!xen_vm_create(((struct _xenapiPrivate *)(conn->privateData))->ses= sion, - vm, *record)) { + vm, *record)) { xenapiSessionErrorHandler(conn, VIR_ERR_INTERNAL_ERROR, NULL); return -1; } --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list