[[RFCv2] 1/4] api: ipsec: mark odp_ipsec_sa_create argument as constant

Message ID 20170427115150.19452-1-dmitry.ereminsolenikov@linaro.org
State New
Headers show

Commit Message

Dmitry Eremin-Solenikov April 27, 2017, 11:51 a.m.
odp_ipsec_sa_create() should not change its argument. Thus mark it as a
constant.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
 include/odp/api/spec/ipsec.h       | 2 +-
 platform/linux-generic/odp_ipsec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.11.0

Patch

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index cccb3b3c..4f746f67 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -773,7 +773,7 @@  void odp_ipsec_sa_param_init(odp_ipsec_sa_param_t *param);
  *
  * @see odp_ipsec_sa_param_init()
  */
-odp_ipsec_sa_t odp_ipsec_sa_create(odp_ipsec_sa_param_t *param);
+odp_ipsec_sa_t odp_ipsec_sa_create(const odp_ipsec_sa_param_t *param);
 
 /**
  * Disable IPSEC SA
diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c
index 5eb1be30..10918dfb 100644
--- a/platform/linux-generic/odp_ipsec.c
+++ b/platform/linux-generic/odp_ipsec.c
@@ -52,7 +52,7 @@  void odp_ipsec_sa_param_init(odp_ipsec_sa_param_t *param)
 	memset(param, 0, sizeof(odp_ipsec_sa_param_t));
 }
 
-odp_ipsec_sa_t odp_ipsec_sa_create(odp_ipsec_sa_param_t *param)
+odp_ipsec_sa_t odp_ipsec_sa_create(const odp_ipsec_sa_param_t *param)
 {
 	(void)param;