lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1486712219-3291-1-git-send-email-der.herr@hofr.at>
Date:   Fri, 10 Feb 2017 08:36:59 +0100
From:   Nicholas Mc Guire <der.herr@...r.at>
To:     Seth Forshee <seth.forshee@...onical.com>
Cc:     "Eric W. Biederman" <ebiederm@...ssion.com>,
        Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
        Al Viro <viro@...iv.linux.org.uk>,
        Felipe Balbi <balbi@...nel.org>,
        Deepa Dinamani <deepa.kernel@...il.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Waiman Long <longman@...hat.com>, linux-kernel@...r.kernel.org,
        Nicholas Mc Guire <der.herr@...r.at>
Subject: [PATCH] ipc/mqueue: use unsigned int for retval

The retval variable is assigned by bitops only and thus there is no
reason to use a signed type. Further matching it with the return 
type of the function also makes static code checkers happy.

Signed-off-by: Nicholas Mc Guire <der.herr@...r.at>
---

Found by experimental type-checking coccinelle script

Patch was compile tested with: x86_64_defconfig

Patch is against 4.10-rc6 (localversion-next is next-20170209)

 ipc/mqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 4fdd970..897ce70 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -519,7 +519,7 @@ static int mqueue_flush_file(struct file *filp, fl_owner_t id)
 static unsigned int mqueue_poll_file(struct file *filp, struct poll_table_struct *poll_tab)
 {
 	struct mqueue_inode_info *info = MQUEUE_I(file_inode(filp));
-	int retval = 0;
+	unsigned int retval = 0;
 
 	poll_wait(filp, &info->wait_q, poll_tab);
 
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ