]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_quota: fix unsigned int id comparisons
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 10 Jul 2020 19:33:36 +0000 (15:33 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 10 Jul 2020 19:33:36 +0000 (15:33 -0400)
commiteaa5b0b79bcf2eb36f7a5e1a5b7171ad5ced7bac
tree99bfb715db53daaa0461d62d491229250d965774
parent6df28d12d7760701c9d11e659e374665c5ffd0b9
xfs_quota: fix unsigned int id comparisons

Fix compiler warnings about unsigned int comparisons by replacing them
with an explicit check for the one possible invalid value (-1U).
id_from_string sets exitcode to nonzero when it sees this value, so the
call sites don't have to do that.

Coverity-id: 146385514638561463857
Fixes: 67a73d6139d0 ("xfs_quota: refactor code to generate id from name")
Fixes: 36dc471cc9bb ("xfs_quota: allow individual timer extension")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
quota/edit.c