xfs: don't allow negative error tags
Errors go from zero which means no error to XFS_ERRTAG_MAX (22). My static checker complains that xfs_errortag_add() puts an upper bound on this but not a lower bound. Let's fix it by making it unsigned. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
7f1b62457b
commit
fbc21f33cd
@@ -55,7 +55,7 @@ xfs_error_test(int error_tag, int *fsidp, char *expression,
|
||||
}
|
||||
|
||||
int
|
||||
xfs_errortag_add(int error_tag, xfs_mount_t *mp)
|
||||
xfs_errortag_add(unsigned int error_tag, xfs_mount_t *mp)
|
||||
{
|
||||
int i;
|
||||
int len;
|
||||
|
||||
Reference in New Issue
Block a user