summaryrefslogtreecommitdiffstats
path: root/tests/bugs/shard/bug-shard-discard.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs/shard/bug-shard-discard.c')
-rw-r--r--tests/bugs/shard/bug-shard-discard.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/bugs/shard/bug-shard-discard.c b/tests/bugs/shard/bug-shard-discard.c
index 15dca6c..6fa93fb 100644
--- a/tests/bugs/shard/bug-shard-discard.c
+++ b/tests/bugs/shard/bug-shard-discard.c
@@ -50,8 +50,9 @@ main(int argc, char *argv[])
goto out;
}
- off = atoi(argv[4]);
- len = atoi(argv[5]);
+ /* Note that off_t is signed but size_t isn't. */
+ off = strtol(argv[4], NULL, 10);
+ len = strtoul(argv[5], NULL, 10);
ret = glfs_discard(fd, off, len);
if (ret <= 0) {