summaryrefslogtreecommitdiff
path: root/net/cia/patches/patch-ac
blob: f89de44cf53ae9fca1d867243ec6299baef63584 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$NetBSD: patch-ac,v 1.1 2006/01/23 18:46:00 tron Exp $

Index: ipstat/config.c
===================================================================
RCS file: /share/cvsroot/net/ipstat/ipstat/config.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ipstat/config.c	30 Dec 2004 21:41:39 -0000	1.6
+++ ipstat/config.c	23 Jan 2006 13:13:56 -0000	1.7
@@ -312,8 +312,8 @@
             {
              struct in_addr *Addr,*Mask;
 
-             Addr=&((Type==0)?Mt->m_SrcAddr:Mt->m_DstAddr);
-             Mask=&((Type==0)?Mt->m_SrcMask:Mt->m_DstMask);
+             Addr=((Type==0)?&Mt->m_SrcAddr:&Mt->m_DstAddr);
+             Mask=((Type==0)?&Mt->m_SrcMask:&Mt->m_DstMask);
              if (!ParseNet(*Arg,Addr,Mask))
               {
                (void)fprintf(stderr,
@@ -362,7 +362,8 @@
                return FALSE;
               }
 
-             ((Type==3)?Mt->m_SrcPort:Mt->m_DstPort)=Port;
+             if (Type==3) Mt->m_SrcPort=Port;
+             else Mt->m_DstPort=Port;
             }
           }