summaryrefslogtreecommitdiffstats
path: root/tests/xtouch.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2025-04-18 14:09:35 -0400
committerTavian Barnes <tavianator@tavianator.com>2025-04-18 14:09:35 -0400
commit96f98cea12d6ae80ecb45dba2fb14555c74612fc (patch)
tree0bdfb49f9ac1bf52833ae1e451e7b54badfb402f /tests/xtouch.c
parentf9fd4b9be60848bfd69682af45c51739bf7aa3bf (diff)
downloadbfs-96f98cea12d6ae80ecb45dba2fb14555c74612fc.tar.xz
bfstd: Add some more integer parsing functionsHEADmain
Diffstat (limited to 'tests/xtouch.c')
-rw-r--r--tests/xtouch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/xtouch.c b/tests/xtouch.c
index 5d65a4c..f33c573 100644
--- a/tests/xtouch.c
+++ b/tests/xtouch.c
@@ -217,8 +217,8 @@ int main(int argc, char *argv[]) {
}
if (marg) {
- long mode;
- if (xstrtol(marg, NULL, 8, &mode) == 0 && mode >= 0 && mode < 01000) {
+ unsigned int mode;
+ if (xstrtoui(marg, NULL, 8, &mode) == 0 && mode < 01000) {
args.fmode = args.dmode = mode;
} else {
fprintf(stderr, "%s: Invalid mode '%s'\n", cmd, marg);