From 169daa11155988a210fac949297381743f3cb400 Mon Sep 17 00:00:00 2001 From: Kacper Date: Tue, 9 Dec 2025 23:14:53 +0100 Subject: feat: clang-tidy fixes --- lib/libc/unistd/getopt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libc/unistd/getopt.c') diff --git a/lib/libc/unistd/getopt.c b/lib/libc/unistd/getopt.c index 0a3b38cb..c942da56 100644 --- a/lib/libc/unistd/getopt.c +++ b/lib/libc/unistd/getopt.c @@ -56,7 +56,7 @@ int getopt(int argc, char *const argv[], const char *optstring) } while (d && d != c); if (d != c || c == ':') { - optopt = c; + optopt = (unsigned char)c; if (optstring[0] != ':' && opterr) { struct iovec iov[4]; char opt_char[2] = { *optchar, '\0' }; @@ -85,7 +85,7 @@ int getopt(int argc, char *const argv[], const char *optstring) optpos = 0; } if (optind > argc) { - optopt = c; + optopt = (unsigned char)c; if (optstring[0] == ':') { return ':'; } -- cgit v1.2.3