logo

utils-std

Collection of commonly available Unix tools
commit: e78d2eca77890c66b46aff7ea0bb1d89b038d265
parent 1a27d14be31df6f0b8b735986c61e3db27de39b3
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 27 Apr 2024 09:27:39 +0200

lib/truncation: Error out on unknown operator

Diffstat:

Mlib/truncation.c3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/truncation.c b/lib/truncation.c @@ -136,6 +136,9 @@ parse_size(char *arg, struct truncation *buf) op = OP_CHK_UP; arg++; break; + default: + fprintf(stderr, "%s: Unknown size operator '%c'\n", argv0, arg[0]); + return -1; } assert(errno == 0);