]> git.karo-electronics.de Git - linux-beck.git/commit
sunrpc/cache.h: replace simple_strtoul
authorEldad Zack <eldad@fogrefinery.com>
Fri, 6 Jul 2012 19:31:57 +0000 (21:31 +0200)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 11 Jul 2012 20:08:00 +0000 (16:08 -0400)
commitbbf43dc888833ac0539e437dbaeb28bfd4fbab9f
tree3e75d68f3811f438c451281e30ec5ad16b555c58
parentd9c2ede63c74048dfddbb129c59ac01176b0ab71
sunrpc/cache.h: replace simple_strtoul

This patch replaces the usage of simple_strtoul with kstrtoint in
get_int(), since the simple_str* family doesn't account for overflow
and is deprecated.
Also, in this specific case, the long from strtol is silently converted
to an int by the caller.

As Joe Perches <joe@perches.com> suggested, this patch also removes
the redundant temporary variable rv, since kstrtoint() will not write to
anint unless it's successful.

Cc: Joe Perches <joe@perches.com>
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
include/linux/sunrpc/cache.h