From 96f98cea12d6ae80ecb45dba2fb14555c74612fc Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 18 Apr 2025 14:09:35 -0400 Subject: bfstd: Add some more integer parsing functions --- tests/xtouch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/xtouch.c') 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); -- cgit v1.2.3