[Replicant] [PATCH 2/2] ril2ipc_net_mode_sel: cleanup ifdefs

Denis 'GNUtoo' Carikli GNUtoo at cyberdimension.org
Thu Jun 20 19:41:39 UTC 2019


Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at cyberdimension.org>
---
 network.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/network.c b/network.c
index f8213d3..3767072 100644
--- a/network.c
+++ b/network.c
@@ -358,11 +358,7 @@ int ipc2ril_net_mode_sel(struct ipc_net_mode_sel_data *data)
 
 #if RIL_VERSION >= 6
 unsigned char ril2ipc_net_mode_sel(RIL_PreferredNetworkType type)
-#else
-unsigned char ril2ipc_net_mode_sel(int type)
-#endif
 {
-#if RIL_VERSION >= 6
 	switch (type) {
 		case PREF_NET_TYPE_GSM_WCDMA:
 		case PREF_NET_TYPE_GSM_WCDMA_AUTO:
@@ -374,7 +370,10 @@ unsigned char ril2ipc_net_mode_sel(int type)
 		default:
 			return IPC_NET_MODE_SEL_GSM_UMTS;
 	}
+}
 #else
+unsigned char ril2ipc_net_mode_sel(int type)
+{
 	switch (type) {
 		case 0:
 		case 3:
@@ -386,8 +385,8 @@ unsigned char ril2ipc_net_mode_sel(int type)
 		default:
 			return IPC_NET_MODE_SEL_GSM_UMTS;
 	}
-#endif
 }
+#endif
 
 int ipc_disp_icon_info(struct ipc_message *message)
 {
-- 
2.21.0



More information about the Replicant mailing list