diff options
Diffstat (limited to 'src/getoptb.c')
-rw-r--r-- | src/getoptb.c | 11 |
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; } |