From 413c27d8697751f72d2d6cf289140a8e060a8032 Mon Sep 17 00:00:00 2001 From: Eldad Zack Date: Sat, 19 May 2012 14:13:18 +0000 Subject: net/ipv4: replace simple_strtoul with kstrtoul Replace simple_strtoul with kstrtoul in three similar occurrences, all setup handlers: * route.c: set_rhash_entries * tcp.c: set_thash_entries * udp.c: set_uhash_entries Also check if the conversion failed. Signed-off-by: Eldad Zack Signed-off-by: David S. Miller --- net/ipv4/tcp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'net/ipv4/tcp.c') diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 63ddaee7209f..e13546ca9923 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -3462,9 +3462,15 @@ extern struct tcp_congestion_ops tcp_reno; static __initdata unsigned long thash_entries; static int __init set_thash_entries(char *str) { + ssize_t ret; + if (!str) return 0; - thash_entries = simple_strtoul(str, &str, 0); + + ret = kstrtoul(str, 0, &thash_entries); + if (ret) + return 0; + return 1; } __setup("thash_entries=", set_thash_entries); -- cgit v1.2.3-58-ga151