From 795ffc5e62e8ba383575dbcd9943a580d4bd3358 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Tue, 9 Jul 2024 15:50:21 +0200 Subject: formatting changes Manual format adjustments. Comment adjustments. Remove usage of the register keyword. --- src/getoptb.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/getoptb.c') diff --git a/src/getoptb.c b/src/getoptb.c index 9859102..64ac8ca 100644 --- a/src/getoptb.c +++ b/src/getoptb.c @@ -3,10 +3,10 @@ #include "buffer.h" /** - @file getoptb.c - @author djb - @source ucspi-tcp - @brief 'getopt' version w/o stdlib + @file getoptb.c + @author djb + @source ucspi-tcp + @brief 'getopt' version w/o stdlib */ #define optind subgetoptind @@ -27,7 +27,7 @@ int getopt(int argc, char **argv, char *opts) if (*s == '/') optprogname = s + 1; } c = subgetopt(argc, argv, opts); - if (opterr) + if (opterr) { if (c == '?') { char chp[2]; chp[0] = optproblem; @@ -40,6 +40,7 @@ int getopt(int argc, char **argv, char *opts) buffer_put(buffer_2, chp, 2); buffer_flush(buffer_2); } + } return c; } -- cgit v1.2.3