From 359636170fdec2230aebef582b7fc75081cca819 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 29 Jun 2015 20:44:12 +0300 Subject: [PATCH] hw_features: Merge similar return case in check_40mhz_2g4() There is no need to have separate return statements for these corner cases that are unlikely to be hit in practice. Signed-off-by: Jouni Malinen --- src/common/hw_features_common.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c index e589a1a46..9c37ea63c 100644 --- a/src/common/hw_features_common.c +++ b/src/common/hw_features_common.c @@ -272,10 +272,8 @@ int check_40mhz_2g4(struct hostapd_hw_modes *mode, int affected_start, affected_end; size_t i; - if (!mode || !scan_res || !pri_chan || !sec_chan) - return 0; - - if (pri_chan == sec_chan) + if (!mode || !scan_res || !pri_chan || !sec_chan || + pri_chan == sec_chan) return 0; pri_freq = hw_get_freq(mode, pri_chan);