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: <1475699578-31474-1-git-send-email-jkhasdev@gmail.com>
Date:   Thu,  6 Oct 2016 02:02:58 +0530
From:   Jitendra Khasdev <jkhasdev@...il.com>
To:     w.d.hubbs@...il.com, chris@...-brannons.com, kirk@...sers.ca,
        samuel.thibault@...-lyon.org, gregkh@...uxfoundation.org,
        bankarsandhya512@...il.com, saurabh.truth@...il.com,
        amitoj1606@...il.com
Cc:     speakup@...ux-speakup.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org,
        Jitendra Kumar Khasdev <jkhasdev@...il.com>
Subject: [PATCH] staging: speakup: Replaced obsolete simple_strtoul

From: Jitendra Kumar Khasdev <jkhasdev@...il.com>

This patch is for replacing obsolete simple_strtoul to kstrtoul which remove warning produce by checkpatch.

Signed-off-by: Jitendra Kumar Khasdev <jkhasdev@...il.com>
---
 drivers/staging/speakup/varhandlers.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/speakup/varhandlers.c b/drivers/staging/speakup/varhandlers.c
index 21186e3..1a3caf3 100644
--- a/drivers/staging/speakup/varhandlers.c
+++ b/drivers/staging/speakup/varhandlers.c
@@ -323,9 +323,11 @@ char *spk_strlwr(char *s)
 
 char *spk_s2uchar(char *start, char *dest)
 {
-	int val;
+	unsigned long val;
+
+	if (kstrtoul(start, 10, &val))
+		return NULL;
 
-	val = simple_strtoul(skip_spaces(start), &start, 10);
 	if (*start == ',')
 		start++;
 	*dest = (u_char)val;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ