mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
fstrim: Use strtoull instead of strtoul
When we are parsing input arguments we should really use stroull to get unsigned long long numbers, since this is what we can specify on the command line. With this fix it should parse long numbers on the 32 bit architecture correctly. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Reviewed-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
committed by
Alex Elder
parent
314b221201
commit
2cede87d20
+1
-1
@@ -97,7 +97,7 @@ static unsigned long long get_number(char **optarg)
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
number = strtoul(opt, &end , 0);
|
||||
number = strtoull(opt, &end , 0);
|
||||
if (errno)
|
||||
err_exit("%s: %s (%s)\n", program_name,
|
||||
strerror(errno), *optarg);
|
||||
|
||||
Reference in New Issue
Block a user