summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-06-20 20:50:04 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-08-27 18:12:56 +0200
commitd35e040065c0c33525e946c8b9d1f759be90e32d (patch)
tree40250f8a84b5d66625a077507b90af717433c756
parent94af2e0817366f2f687392508cc41e159d08a774 (diff)
downloadhardware_replicant_libsamsung-ril-d35e040065c0c33525e946c8b9d1f759be90e32d.tar.gz
hardware_replicant_libsamsung-ril-d35e040065c0c33525e946c8b9d1f759be90e32d.tar.bz2
hardware_replicant_libsamsung-ril-d35e040065c0c33525e946c8b9d1f759be90e32d.zip
network: ril2ipc_net_mode_sel function: cleanup ifdefs
Since the whole content of the ril2ipc_net_mode_sel function is ifdefed, it makes more sense to wrap the whole function with ifdefs instead, in order to increase readability. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--network.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/network.c b/network.c
index dff666b..45e8aed 100644
--- a/network.c
+++ b/network.c
@@ -379,11 +379,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:
@@ -395,7 +391,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:
@@ -407,8 +406,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)
{