summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
authorMarkus Elfring2016-01-04 06:13:21 +0100
committerDave Chinner2016-01-04 06:13:21 +0100
commita841b64df29b4c7e68ce564d752dfb2042db5404 (patch)
tree23345028be9659e59719c0744e85ff79b7124bd7 /fs/xfs/xfs_super.c
parentlibxfs: refactor short btree block verification (diff)
downloadkernel-qcow2-linux-a841b64df29b4c7e68ce564d752dfb2042db5404.tar.gz
kernel-qcow2-linux-a841b64df29b4c7e68ce564d752dfb2042db5404.tar.xz
kernel-qcow2-linux-a841b64df29b4c7e68ce564d752dfb2042db5404.zip
XFS: Use a signed return type for suffix_kstrtoint()
The return type "unsigned long" was used by the suffix_kstrtoint() function even though it will eventually return a negative error code. Improve this implementation detail by using the type "int" instead. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 36bd8825bfb0..b35775752b74 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -137,7 +137,7 @@ static const match_table_t tokens = {
};
-STATIC unsigned long
+STATIC int
suffix_kstrtoint(char *s, unsigned int base, int *res)
{
int last, shift_left_factor = 0, _res;