Author: glebius
Date: Fri Nov 22 18:54:06 2013
New Revision: 258475
URL: http://svnweb.freebsd.org/changeset/base/258475

Log:
  Style: don't compare unsigned <= 0.
  
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/netpfil/pf/pf.c

Modified: head/sys/netpfil/pf/pf.c
==============================================================================
--- head/sys/netpfil/pf/pf.c    Fri Nov 22 18:53:54 2013        (r258474)
+++ head/sys/netpfil/pf/pf.c    Fri Nov 22 18:54:06 2013        (r258475)
@@ -1471,7 +1471,7 @@ pf_purge_expired_src_nodes()
        for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) {
            PF_HASHROW_LOCK(sh);
            LIST_FOREACH_SAFE(cur, &sh->nodes, entry, next)
-               if (cur->states <= 0 && cur->expire <= time_uptime) {
+               if (cur->states == 0 && cur->expire <= time_uptime) {
                        if (cur->rule.ptr != NULL)
                                cur->rule.ptr->src_nodes--;
                        LIST_REMOVE(cur, entry);
@@ -1492,7 +1492,7 @@ pf_src_tree_remove_state(struct pf_state
        if (s->src_node != NULL) {
                if (s->src.tcp_est)
                        --s->src_node->conn;
-               if (--s->src_node->states <= 0) {
+               if (--s->src_node->states == 0) {
                        timeout = s->rule.ptr->timeout[PFTM_SRC_NODE];
                        if (!timeout)
                                timeout =
@@ -1501,7 +1501,7 @@ pf_src_tree_remove_state(struct pf_state
                }
        }
        if (s->nat_src_node != s->src_node && s->nat_src_node != NULL) {
-               if (--s->nat_src_node->states <= 0) {
+               if (--s->nat_src_node->states == 0) {
                        timeout = s->rule.ptr->timeout[PFTM_SRC_NODE];
                        if (!timeout)
                                timeout =
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to