Skip to content

Commit

Permalink
XFS: Use a signed return type for suffix_kstrtoint()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Markus Elfring authored and Dave Chinner committed Jan 4, 2016
1 parent c5ab131 commit a841b64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a841b64

Please sign in to comment.