Patchwork [2/4] qa: change an if to elseif

login
register
mail settings
Submitter Jan Engelhardt
Date May 19, 2012, 10:08 p.m.
Message ID <1337465292-28924-3-git-send-email-jengelh@inai.de>
Download mbox | patch
Permalink /patch/160210/
State Accepted
Headers show

Comments

Jan Engelhardt - May 19, 2012, 10:08 p.m.
From: Jan Engelhardt <jengelh@medozas.de>

The compiler is probably smart enough to see that the type cannot
change, but make an "else" out of it, just for fun.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 qa/ct_events_reliable.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/qa/ct_events_reliable.c b/qa/ct_events_reliable.c
index 1c8e194..b51d0e5 100644
--- a/qa/ct_events_reliable.c
+++ b/qa/ct_events_reliable.c
@@ -15,7 +15,7 @@  static int event_cb(enum nf_conntrack_msg_type type,
 {
 	if (type == NFCT_T_NEW)
 		new++;
-	if (type == NFCT_T_UPDATE)
+	else if (type == NFCT_T_UPDATE)
 		update++;
 	else if (type == NFCT_T_DESTROY)
 		destroy++;