summaryrefslogtreecommitdiff
path: root/src/getoptb.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-09 15:50:21 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-09 15:50:21 +0200
commit795ffc5e62e8ba383575dbcd9943a580d4bd3358 (patch)
treec128889056202b255e2f22afeb7717894d350862 /src/getoptb.c
parent5fadc0cbb8577c61d66bd6f19ceaf0507c11e23b (diff)
formatting changes
Manual format adjustments. Comment adjustments. Remove usage of the register keyword.
Diffstat (limited to 'src/getoptb.c')
-rw-r--r--src/getoptb.c11
1 files changed, 6 insertions, 5 deletions
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;
}