fix compilation warning

This commit is contained in:
frtabu
2019-02-17 23:46:45 +01:00
parent 38d772d8a2
commit 3f61d5f720
6 changed files with 21 additions and 30 deletions
+8 -12
View File
@@ -48,21 +48,17 @@ Description Defines functions used to handle EPS bearer contexts.
#include "emm_sap.h"
#include "system.h"
#if defined(ENABLE_ITTI)
# include "assertions.h"
#endif
#include "assertions.h"
#include "pdcp.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef PDCP_USE_NETLINK
#ifdef UESIM_EXPANSION
#include "openairinterface5g_limits.h"
extern uint16_t inst_pdcp_list[NUMBER_OF_UE_MAX];
#endif
#endif
extern uint8_t nfapi_mode;
/****************************************************************************/
@@ -282,10 +278,10 @@ int esm_ebr_context_create(
// this is for L2 FAPI simulator.
// change for multiple UE's like 256UEs.
// if it's made too many tables , OS may crush so we use one table.
#ifdef PDCP_USE_NETLINK
if(PDCP_USE_NETLINK) {
#ifdef UESIM_EXPANSION
uint16_t inst_nic = (pdn->ip_addr[3] & 0x000000FF) - 2;
res = sprintf(command_line,
uint16_t inst_nic = (pdn->ip_addr[3] & 0x000000FF) - 2;
res = sprintf(command_line,
"ifconfig oip%d %s netmask %s broadcast %s up && "
"ip rule add from %s/24 table %d && "
"ip rule add to %s/24 table %d && "
@@ -295,9 +291,9 @@ int esm_ebr_context_create(
ipv4_addr, 201,
inst_nic + 1, 201);
inst_pdcp_list[inst_nic] = ueid;
inst_pdcp_list[inst_nic] = ueid;
#else
res = sprintf(command_line,
res = sprintf(command_line,
"ifconfig oip%d %s netmask %s broadcast %s up && "
"ip rule add from %s/32 table %d && "
"ip rule add to %s/32 table %d && "
@@ -307,7 +303,7 @@ int esm_ebr_context_create(
ipv4_addr, ueid + 201,
ueid + 1, ueid + 201);
#endif
#endif
} // PDCP_USE_NETLINK
} else {
res = sprintf(command_line,
"ifconfig oip%d %s netmask %s broadcast %s up && "