From 9df0c75da76d81285c5fca90bb8d538c68b38119 Mon Sep 17 00:00:00 2001 From: mdw Date: Wed, 17 Sep 1997 10:14:10 +0000 Subject: [PATCH] Fix a typo. Support service names in `--port' option. --- src/become.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/become.c b/src/become.c index 2154e4b..d94e3c2 100644 --- a/src/become.c +++ b/src/become.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: become.c,v 1.9 1997/09/10 10:28:05 mdw Exp $ + * $Id: become.c,v 1.10 1997/09/17 10:14:10 mdw Exp $ * * Main code for `become' * @@ -29,6 +29,9 @@ /*----- Revision history --------------------------------------------------* * * $Log: become.c,v $ + * Revision 1.10 1997/09/17 10:14:10 mdw + * Fix a typo. Support service names in `--port' option. + * * Revision 1.9 1997/09/10 10:28:05 mdw * Allow default port to be given as a service name or port number. Handle * groups properly (lots of options here). @@ -437,7 +440,7 @@ int main(int argc, char *argv[]) /* --- Become server setup parameters --- */ char *conffile = file_RULES; /* Default config file for daemon */ - int port = -1; /* Default port for daemon */ + int port = 0; /* Default port for daemon */ /* --- Miscellanous shared variables --- */ @@ -752,7 +755,7 @@ int main(int argc, char *argv[]) } bc__write(stdout, "\n" -"Also, `+' and `-' options are recognised to turn on and off vavrious\n" +"Also, `+' and `-' options are recognised to turn on and off various\n" "tracing options. For example, `A-r' enables everything except ruleset\n" "tracing, and `A-D+c' is everything except the defaults, but with request\n" "check tracing.\n" @@ -805,9 +808,10 @@ int main(int argc, char *argv[]) /* --- None of the above --- */ if (optarg[sz] == 0 || (optarg[sz] != '=' && optarg[sz + 1] != 0)) { - if (who == 0) + if (!who) { who = optarg; - else { + break; + } else { optind--; goto done_options; } -- 2.11.0