Skip to content

Commit a841b64

Browse files
elfringdchinner
authored andcommitted
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 <[email protected]> Reviewed-by: Eric Sandeen <[email protected]> Signed-off-by: Dave Chinner <[email protected]>
1 parent c5ab131 commit a841b64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/xfs/xfs_super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ static const match_table_t tokens = {
137137
};
138138

139139

140-
STATIC unsigned long
140+
STATIC int
141141
suffix_kstrtoint(char *s, unsigned int base, int *res)
142142
{
143143
int last, shift_left_factor = 0, _res;

0 commit comments

Comments
 (0)