From: Alejandro Colomar Date: Fri, 13 Dec 2024 13:30:46 +0000 (+0100) Subject: src/bin/diffman: Add default case X-Git-Tag: man-pages-6.10~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2dfd79facf0fe15b7d20c4b937f9ae5851140a2;p=thirdparty%2Fman-pages.git src/bin/diffman: Add default case SC2249 (info): Consider adding a default *) case, even if it just exits with error. In principle, getopts(1) shouldn't return other stuff, but it doesn't hurt to be cutious. Reported-by: shellcheck(1) Signed-off-by: Alejandro Colomar --- diff --git a/src/bin/diffman b/src/bin/diffman index b94ac8e75..0cee3d979 100755 --- a/src/bin/diffman +++ b/src/bin/diffman @@ -24,6 +24,7 @@ while getopts "U:w" opt; do U) u="-U$OPTARG"; ;;& w) w='-w'; ;;& \?) exit 1; ;;& + *) exit 1; ;;& esac; done; shift $((OPTIND-1));