summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-11-18 23:13:33 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-11-18 23:13:33 +0000
commitf1febdc20fe5fc7b7e503966efb5394de13d6a69 (patch)
treeb5ba3267db956727b8ad04b29440f00fd076cfc4
parent0ae7519d719d959a6a6126e93044ceab3da3dc12 (diff)
KNF
-rw-r--r--sbin/pfctl/parse.y14
-rw-r--r--sbin/pfctl/pfctl_altq.c10
2 files changed, 12 insertions, 12 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 554458f1fc7..23f6890bcfb 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.188 2002/11/18 22:55:39 deraadt Exp $ */
+/* $OpenBSD: parse.y,v 1.189 2002/11/18 23:13:32 deraadt Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -1602,11 +1602,11 @@ natrule : no NAT interface af proto fromto redirection
nat.af = $4;
if (!nat.af) {
- if ($6.src.host && $6.src.host->af
- && !$6.src.host->ifindex)
+ if ($6.src.host && $6.src.host->af &&
+ !$6.src.host->ifindex)
nat.af = $6.src.host->af;
- else if ($6.dst.host && $6.dst.host->af
- && !$6.dst.host->ifindex)
+ else if ($6.dst.host && $6.dst.host->af &&
+ !$6.dst.host->ifindex)
nat.af = $6.dst.host->af;
}
@@ -3176,8 +3176,8 @@ ifa_lookup(char *ifa_name, enum pfctl_iflookup_mode mode)
ifa_load();
for (p = iftab; p; p = p->next) {
- if (!((p->af == AF_INET || p->af == AF_INET6)
- && (!strncmp(p->ifname, ifa_name, IFNAMSIZ) || return_all)))
+ if (!((p->af == AF_INET || p->af == AF_INET6) &&
+ (!strncmp(p->ifname, ifa_name, IFNAMSIZ) || return_all)))
continue;
if (mode == PFCTL_IFLOOKUP_BCAST && p->af != AF_INET)
continue;
diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c
index 624376d6d04..7b7f30fb642 100644
--- a/sbin/pfctl/pfctl_altq.c
+++ b/sbin/pfctl/pfctl_altq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_altq.c,v 1.2 2002/11/18 22:55:39 deraadt Exp $ */
+/* $OpenBSD: pfctl_altq.c,v 1.3 2002/11/18 23:13:32 deraadt Exp $ */
/*
* Copyright (C) 2002
* Sony Computer Science Laboratories Inc. All rights reserved.
@@ -73,8 +73,8 @@ pfaltq_free(struct pf_altq *a)
struct pf_altq *altq;
TAILQ_FOREACH(altq, &altqs, entries) {
- if (strncmp(a->ifname, altq->ifname, IFNAMSIZ) == 0
- && strncmp(a->qname, altq->qname, PF_QNAME_SIZE) == 0) {
+ if (strncmp(a->ifname, altq->ifname, IFNAMSIZ) == 0 &&
+ strncmp(a->qname, altq->qname, PF_QNAME_SIZE) == 0) {
TAILQ_REMOVE(&altqs, altq, entries);
free(altq);
return;
@@ -88,8 +88,8 @@ pfaltq_lookup(const char *ifname)
struct pf_altq *altq;
TAILQ_FOREACH(altq, &altqs, entries) {
- if (strncmp(ifname, altq->ifname, IFNAMSIZ) == 0
- && altq->qname[0] == 0)
+ if (strncmp(ifname, altq->ifname, IFNAMSIZ) == 0 &&
+ altq->qname[0] == 0)
return (altq);
}
return (NULL);