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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e071f0a1-536b-150d-3f2b-f0b806e59559@users.sourceforge.net>
Date:   Fri, 26 Aug 2016 14:58:08 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-cris-kernel@...s.com,
        Adam Buchbinder <adam.buchbinder@...il.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Ingo Molnar <mingo@...nel.org>,
        Jesper Nilsson <jesper.nilsson@...s.com>,
        Jiri Kosina <jkosina@...e.cz>,
        Mikael Starvik <starvik@...s.com>,
        Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org,
        Julia Lawall <julia.lawall@...6.fr>,
        Paolo Bonzini <pbonzini@...hat.com>
Subject: [PATCH 7/8] cris-cryptocop: Delete unnecessary variable
 initialisations in cryptocop_ioctl_process()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Fri, 26 Aug 2016 13:57:21 +0200

Nine local variables will be set to an appropriate value a bit later.
Thus omit the explicit initialisation which became unnecessary with
a previous update step.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 arch/cris/arch-v32/drivers/cryptocop.c | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
index a682b1f..1a966dc 100644
--- a/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/arch/cris/arch-v32/drivers/cryptocop.c
@@ -2461,14 +2461,12 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig
 	struct cryptocop_private        *dev = filp->private_data;
 	struct strcop_crypto_op         *crp_oper = (struct strcop_crypto_op *)arg;
 	struct strcop_crypto_op         oper = {0};
-	int                             err = 0;
-	struct cryptocop_operation      *cop = NULL;
-
-	struct ioctl_job_cb_ctx         *jc = NULL;
-
-	struct page                     **inpages = NULL;
+	int                             err;
+	struct cryptocop_operation      *cop;
+	struct ioctl_job_cb_ctx         *jc;
+	struct page                     **inpages;
 	struct page                     **outpages = NULL;
-	int                             noinpages = 0;
+	int                             noinpages;
 	int                             nooutpages;
 
 	struct cryptocop_desc           descs[5]; /* Max 5 descriptors are needed, there are three transforms that
@@ -2482,16 +2480,14 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig
 
 	unsigned char                   *digest_result = NULL;
 	int                             digest_length = 0;
-	int                             cblocklen = 0;
+	int                             cblocklen;
 	unsigned char                   csum_result[CSUM_BLOCK_LENGTH];
 	struct cryptocop_session        *sess;
-
-	int    iovlen = 0;
+	int    iovlen;
 	int    iovix = 0;
 	int    pageix = 0;
-	int    pageoffset = 0;
-
-	size_t prev_ix = 0;
+	int    pageoffset;
+	size_t prev_ix;
 	size_t next_ix;
 
 	int    cipher_active, digest_active, csum_active;
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ