summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-06-23 19:18:13 +0000
committerbrian <brian@FreeBSD.org>1997-06-23 19:18:13 +0000
commit78d67a98b9c2a43720936f8426470072231ee92e (patch)
tree9216d269cc386af298169c65ef1cdcf633066552
parent9289d9c4986115e0de14a3e17a39a6dc24ca0ac1 (diff)
downloadFreeBSD-src-78d67a98b9c2a43720936f8426470072231ee92e.zip
FreeBSD-src-78d67a98b9c2a43720936f8426470072231ee92e.tar.gz
Fix "set parity"
PR: 3881 Actual problem found by: shocking@mailbox.uq.edu.au
-rw-r--r--usr.sbin/ppp/command.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 11c4ad9..f440752 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: command.c,v 1.58 1997/06/14 00:21:23 ache Exp $
+ * $Id: command.c,v 1.59 1997/06/17 02:04:51 brian Exp $
*
*/
#include <sys/types.h>
@@ -840,19 +840,7 @@ struct cmdtab *list;
int argc;
char **argv;
{
- int parity;
-
- if (argc > 0) {
- parity = ChangeParity(*argv);
- if (parity < 0)
- LogPrintf(LogWARN, "Invalid parity.\n");
- else {
- VarParity = parity;
- return 0;
- }
- }
-
- return -1;
+ return argc > 0 ? ChangeParity(*argv) : -1;
}
static int
OpenPOWER on IntegriCloud