ipfw: fix operator error in test

Fix warning spotted by clang on FreeBSD:

source-ipfw.c:241:49: warning: use of logical '||' with constant operand [-Wconstant-logical-operand]
        if (suricata_ctl_flags & (SURICATA_STOP || SURICATA_KILL)) {
                                                ^  ~~~~~~~~~~~~~
source-ipfw.c:241:49: note: use '|' for a bitwise operation
        if (suricata_ctl_flags & (SURICATA_STOP || SURICATA_KILL)) {
                                                ^~
                                                |

Use same logic as the one used in other capture mode.
pull/852/merge
Eric Leblond 12 years ago committed by Victor Julien
parent 9f6527dc16
commit 941cfe1641

@ -238,7 +238,7 @@ TmEcode ReceiveIPFWLoop(ThreadVars *tv, void *data, void *slot)
SCLogInfo("Thread '%s' will run on port %d (item %d)",
tv->name, nq->port_num, ptv->ipfw_index);
while (1) {
if (suricata_ctl_flags & (SURICATA_STOP || SURICATA_KILL)) {
if (unlikely(suricata_ctl_flags != 0)) {
SCReturnInt(TM_ECODE_OK);
}

Loading…
Cancel
Save