From 69d8375caca424d3034523252e0cd4f701173bfb Mon Sep 17 00:00:00 2001 From: "Angelos D. Keromytis" Date: Thu, 25 Feb 1999 00:02:28 +0000 Subject: Fix bug that didn't allow use of sha1/md5. --- sbin/ipsecadm/ipsecadm.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'sbin') diff --git a/sbin/ipsecadm/ipsecadm.c b/sbin/ipsecadm/ipsecadm.c index f87ad0d5a66..fd5ec3badbb 100644 --- a/sbin/ipsecadm/ipsecadm.c +++ b/sbin/ipsecadm/ipsecadm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsecadm.c,v 1.6 1999/02/24 23:47:18 angelos Exp $ */ +/* $OpenBSD: ipsecadm.c,v 1.7 1999/02/25 00:02:27 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -141,14 +141,10 @@ isvalid(char *option, int type, int mode) int i; for (i = sizeof(xf) / sizeof(transform) - 1; i >= 0; i--) - if (!strcmp(option, xf[i].name)) - { - if ((xf[i].flags & CMD_MASK) == type && - (xf[i].flags & mode)) - return xf[i].id; - else - return 0; - } + if (!strcmp(option, xf[i].name) && + (xf[i].flags & CMD_MASK) == type && + (xf[i].flags & mode)) + return xf[i].id; return 0; } -- cgit v1.2.3