summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDeepak S <deepak.s@linux.intel.com>2017-10-17 06:36:37 +0530
committerDeepak S <deepak.s@linux.intel.com>2017-10-16 18:11:40 -0700
commit9dae4a62e3405311151e164d25e6d93d6a707726 (patch)
treef5427915ddd6af139c4969068ae397dc02c675f2 /common
parent2a738a1538bec699534c17d1801bd33f20dafda6 (diff)
Fix compilation issue with older gcc
Change-Id: Ib7f67bff93ce531f66be31c3fbd63ecbb33a46d8 Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Diffstat (limited to 'common')
-rw-r--r--common/VIL/l2l3_stack/lib_arp.c4
-rw-r--r--common/vnf_common/rest_api.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/common/VIL/l2l3_stack/lib_arp.c b/common/VIL/l2l3_stack/lib_arp.c
index 5d78d9ba..d59f4b79 100644
--- a/common/VIL/l2l3_stack/lib_arp.c
+++ b/common/VIL/l2l3_stack/lib_arp.c
@@ -979,10 +979,10 @@ void print_nd_table(void)
printf("\n");
}
- uint32_t i = 0;
+ uint32_t i = 0, p = 0;
printf("\n\nND IPV6 routing table ...\n");
printf ("\nNH_IP_Address Depth Port \n");
- for(uint32_t p = 0; p < gw_get_num_ports(); p++ ) {
+ for(p = 0; p < gw_get_num_ports(); p++ ) {
for (i = 0; i < p_nd_route_data[p]->nd_route_ent_cnt; i++) {
// printf("\n");
diff --git a/common/vnf_common/rest_api.c b/common/vnf_common/rest_api.c
index 7acbc36b..03fbb41d 100644
--- a/common/vnf_common/rest_api.c
+++ b/common/vnf_common/rest_api.c
@@ -1173,7 +1173,7 @@ int route_handler(struct mg_connection *conn, __rte_unused void *cbdata)
/* Handler may access the request info using mg_get_request_info */
const struct mg_request_info *req_info = mg_get_request_info(conn);
uint32_t portid = 0;
- uint32_t i, j, status;
+ uint32_t i, j, status, p;
char buf[MAX_BUF_SIZE];
uint32_t mask = 0, num = 31;
@@ -1195,7 +1195,7 @@ int route_handler(struct mg_connection *conn, __rte_unused void *cbdata)
mg_printf(conn, "\n\nND IPV6 routing table ...\n<br/>");
mg_printf(conn, "\nNH_IP_Address "
" Depth Port \n<br/>");
- for(uint32_t p = 0; p < gw_get_num_ports(); p++ ) {
+ for(p = 0; p < gw_get_num_ports(); p++ ) {
for (i = 0; i < p_nd_route_data[p]->nd_route_ent_cnt; i++) {
for (j = 0; j < ND_IPV6_ADDR_SIZE; j += 2) {
mg_printf(conn, "%02X%02X ",