From nobody Sun Feb 8 13:13:14 2026 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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152466276191688.76911248909471; Wed, 25 Apr 2018 06:26:01 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 536A030016F0; Wed, 25 Apr 2018 13:26:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AAAD72010CE5; Wed, 25 Apr 2018 13:25:59 +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 26929180BAD9; Wed, 25 Apr 2018 13:25:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3PDPCLo002156 for ; Wed, 25 Apr 2018 09:25:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6D523202698A; Wed, 25 Apr 2018 13:25:12 +0000 (UTC) Received: from caroline.localdomain (unknown [10.43.2.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2D046202342F for ; Wed, 25 Apr 2018 13:25:12 +0000 (UTC) Received: from caroline.brq.redhat.com (caroline.usersys.redhat.com [127.0.0.1]) by caroline.localdomain (Postfix) with ESMTP id 2FBB8120073 for ; Wed, 25 Apr 2018 15:25:09 +0200 (CEST) From: Martin Kletzander To: libvir-list@redhat.com Date: Wed, 25 Apr 2018 15:24:46 +0200 Message-Id: <174a43f4cb5fccdfd25304ae7a8952074a720d61.1524661163.git.mkletzan@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 09/30] locking/: Remove spaces after casts 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.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 25 Apr 2018 13:26:01 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Martin Kletzander --- src/locking/lock_driver_sanlock.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sa= nlock.c index 345cf0a77257..9c01f59349fd 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/lock_driver_sanlock.c @@ -258,7 +258,7 @@ virLockManagerSanlockSetupLockspace(virLockManagerSanlo= ckDriverPtr driver) goto error; } =20 - if (driver->group !=3D (gid_t) -1) + if (driver->group !=3D (gid_t)-1) perms |=3D 0060; =20 if ((fd =3D open(path, O_WRONLY|O_CREAT|O_EXCL, perms)) < 0) { @@ -271,13 +271,13 @@ virLockManagerSanlockSetupLockspace(virLockManagerSan= lockDriverPtr driver) VIR_DEBUG("Someone else just created lockspace %s", path); } else { /* chown() the path to make sure sanlock can access it */ - if ((driver->user !=3D (uid_t) -1 || driver->group !=3D (gid_t= ) -1) && + if ((driver->user !=3D (uid_t)-1 || driver->group !=3D (gid_t)= -1) && (fchown(fd, driver->user, driver->group) < 0)) { virReportSystemError(errno, _("cannot chown '%s' to (%u, %u)"), path, - (unsigned int) driver->user, - (unsigned int) driver->group); + (unsigned int)driver->user, + (unsigned int)driver->group); goto error_unlink; } =20 @@ -331,18 +331,18 @@ virLockManagerSanlockSetupLockspace(virLockManagerSan= lockDriverPtr driver) } } else if (S_ISREG(st.st_mode)) { /* okay, the lease file exists. Check the permissions */ - if (((driver->user !=3D (uid_t) -1 && driver->user !=3D st.st_uid)= || - (driver->group !=3D (gid_t) -1 && driver->group !=3D st.st_gi= d)) && + if (((driver->user !=3D (uid_t)-1 && driver->user !=3D st.st_uid) = || + (driver->group !=3D (gid_t)-1 && driver->group !=3D st.st_gid= )) && (chown(path, driver->user, driver->group) < 0)) { virReportSystemError(errno, _("cannot chown '%s' to (%u, %u)"), path, - (unsigned int) driver->user, - (unsigned int) driver->group); + (unsigned int)driver->user, + (unsigned int)driver->group); goto error; } =20 - if ((driver->group !=3D (gid_t) -1 && (st.st_mode & 0060) !=3D 006= 0) && + if ((driver->group !=3D (gid_t)-1 && (st.st_mode & 0060) !=3D 0060= ) && chmod(path, 0660) < 0) { virReportSystemError(errno, _("cannot chmod '%s' to 0660"), @@ -443,8 +443,8 @@ static int virLockManagerSanlockInit(unsigned int versi= on, driver->hostID =3D 0; driver->autoDiskLease =3D false; driver->io_timeout =3D 0; - driver->user =3D (uid_t) -1; - driver->group =3D (gid_t) -1; + driver->user =3D (uid_t)-1; + driver->group =3D (gid_t)-1; if (VIR_STRDUP(driver->autoDiskLeasePath, LOCALSTATEDIR "/lib/libvirt/= sanlock") < 0) { VIR_FREE(driver); goto error; @@ -711,13 +711,13 @@ virLockManagerSanlockCreateLease(virLockManagerSanloc= kDriverPtr driver, VIR_DEBUG("Someone else just created lockspace %s", res->disks= [0].path); } else { /* chown() the path to make sure sanlock can access it */ - if ((driver->user !=3D (uid_t) -1 || driver->group !=3D (gid_t= ) -1) && + if ((driver->user !=3D (uid_t)-1 || driver->group !=3D (gid_t)= -1) && (fchown(fd, driver->user, driver->group) < 0)) { virReportSystemError(errno, _("cannot chown '%s' to (%u, %u)"), res->disks[0].path, - (unsigned int) driver->user, - (unsigned int) driver->group); + (unsigned int)driver->user, + (unsigned int)driver->group); goto error_unlink; } =20 --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list