From e959d4c749cdf3fb5195096bf418ffdab0489047 Mon Sep 17 00:00:00 2001 From: Mike Pechkin Date: Fri, 4 Jan 2002 12:32:31 +0000 Subject: check (p != NULL), not n. dhartmei@ ok --- sbin/pfctl/pfctl_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 5a598cfda01..943a782aaa8 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_parser.c,v 1.56 2001/12/10 18:08:12 dhartmei Exp $ */ +/* $OpenBSD: pfctl_parser.c,v 1.57 2002/01/04 12:32:30 mpech Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -369,7 +369,7 @@ print_nat(struct pf_nat *n) } if (n->proto) { struct protoent *p = getprotobynumber(n->proto); - if (n != NULL) + if (p != NULL) printf("proto %s ", p->p_name); else printf("proto %u ", n->proto); -- cgit v1.2.3