aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim.uvarov@linaro.org>2015-07-27 13:55:05 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-07-27 13:55:05 +0300
commit20309012a16600dda580dbced64bacc965d249b2 (patch)
tree8ae3fd3238e58a26a7ea3bd1d8ac68bc441dcdfd /example
parent716c00c2022b3f1d07fe346d83356e3ea5663cc9 (diff)
parent1338a46573b2c602e3565cb1f372dabef3497eb4 (diff)
Merge branch 'master' into api-next
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> Conflicts: helper/test/odp_chksum.c include/odp/api/init.h platform/linux-generic/include/odp/plat/thrmask_types.h test/validation/cpumask/cpumask.h
Diffstat (limited to 'example')
-rw-r--r--example/Makefile.inc1
-rw-r--r--example/classifier/odp_classifier.c7
-rw-r--r--example/ipsec/README2
-rw-r--r--example/ipsec/odp_ipsec.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/example/Makefile.inc b/example/Makefile.inc
index e1c1cb7..05021d4 100644
--- a/example/Makefile.inc
+++ b/example/Makefile.inc
@@ -1,4 +1,3 @@
-include $(top_srcdir)/Makefile.inc
include $(top_srcdir)/platform/@with_platform@/Makefile.inc
LIB = $(top_builddir)/lib
LDADD = $(LIB)/libodp.la $(LIB)/libodphelper.la
diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c
index 82a74c0..3a16279 100644
--- a/example/classifier/odp_classifier.c
+++ b/example/classifier/odp_classifier.c
@@ -608,10 +608,10 @@ static int parse_pmr_policy(appl_args_t *appl_args, char *argv[], char *optarg)
switch (term) {
case ODP_PMR_SIP_ADDR:
token = strtok(NULL, ":");
- strcpy(stats[policy_count].value, token);
+ strncpy(stats[policy_count].value, token, DISPLAY_STRING_LEN);
parse_ipv4_addr(token, &stats[policy_count].rule.val);
token = strtok(NULL, ":");
- strcpy(stats[policy_count].mask, token);
+ strncpy(stats[policy_count].mask, token, DISPLAY_STRING_LEN);
parse_ipv4_mask(token, &stats[policy_count].rule.mask);
stats[policy_count].val_sz = 4;
break;
@@ -622,7 +622,8 @@ static int parse_pmr_policy(appl_args_t *appl_args, char *argv[], char *optarg)
/* Queue Name */
token = strtok(NULL, ":");
- strcpy(stats[policy_count].queue_name, token);
+
+ strncpy(stats[policy_count].queue_name, token, ODP_QUEUE_NAME_LEN);
appl_args->policy_count++;
free(pmr_str);
return 0;
diff --git a/example/ipsec/README b/example/ipsec/README
index 319bfc2..74f1d26 100644
--- a/example/ipsec/README
+++ b/example/ipsec/README
@@ -49,7 +49,7 @@ VM0 has the follwing interface configuration:
In addition, static ARP and IPv4 routes must be added on VM0:
sudo ip route add 192.168.222.0/24 via 192.168.111.1
- sudo ip route add 192.168.222.0/24 via 192.168.111.1
+ sudo arp -s 192.168.111.1 08:00:27:04:BF:8C
4.2 VM1 configuration
diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index 54f690f..d392925 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -238,7 +238,7 @@ static int num_polled_queues;
static
odp_queue_t polled_odp_queue_create(const char *name,
odp_queue_type_t type,
- odp_queue_param_t *param)
+ odp_queue_param_t *param EXAMPLE_UNUSED)
{
odp_queue_t my_queue;
odp_queue_type_t my_type = type;
@@ -248,7 +248,7 @@ odp_queue_t polled_odp_queue_create(const char *name,
my_type = ODP_QUEUE_TYPE_POLL;
}
- my_queue = odp_queue_create(name, my_type, param);
+ my_queue = odp_queue_create(name, my_type, NULL);
if ((ODP_QUEUE_TYPE_SCHED == type) || (ODP_QUEUE_TYPE_PKTIN == type)) {
poll_queues[num_polled_queues++] = my_queue;