diff options
author | Thomas Egerer <thomas.egerer@secunet.com> | 2016-06-06 13:21:35 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-06-25 12:03:50 (GMT) |
commit | 6a9b59ca731c739fd4a5e3cbcac28309ec427f4b (patch) | |
tree | e9351df256c13b5cf22aa2b4d9f33916222c8df3 /include | |
parent | c009b20919562e6968969309049064d59d35010a (diff) | |
download | libnl-6a9b59ca731c739fd4a5e3cbcac28309ec427f4b.zip libnl-6a9b59ca731c739fd4a5e3cbcac28309ec427f4b.tar.gz libnl-6a9b59ca731c739fd4a5e3cbcac28309ec427f4b.tar.bz2 |
xfrm: make character pointers in setters const
All of these pointers are either strcpy'd or memcpy'd and usually const
in a calling application. Changing them to const in the header does not
break the compatibility and allows for users with const pointers to use
the library without compiler warnings.
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
Signed-off-by: Thomas Haller <thaller@redhat.com>
http://lists.infradead.org/pipermail/libnl/2016-June/002137.html
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink/xfrm/sa.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/netlink/xfrm/sa.h b/include/netlink/xfrm/sa.h index acc7f4d..9209ab0 100644 --- a/include/netlink/xfrm/sa.h +++ b/include/netlink/xfrm/sa.h @@ -111,19 +111,21 @@ extern int xfrmnl_sa_set_flags (struct xfrmnl_sa*, unsigned extern int xfrmnl_sa_get_aead_params (struct xfrmnl_sa*, char*, unsigned int*, unsigned int*, char*); -extern int xfrmnl_sa_set_aead_params (struct xfrmnl_sa*, char*, unsigned int, - unsigned int, char*); +extern int xfrmnl_sa_set_aead_params (struct xfrmnl_sa*, const char*, unsigned int, + unsigned int, const char*); extern int xfrmnl_sa_get_auth_params (struct xfrmnl_sa*, char*, unsigned int*, unsigned int*, char*); -extern int xfrmnl_sa_set_auth_params (struct xfrmnl_sa*, char*, unsigned int, - unsigned int, char*); +extern int xfrmnl_sa_set_auth_params (struct xfrmnl_sa*, const char*, unsigned int, + unsigned int, const char*); extern int xfrmnl_sa_get_crypto_params (struct xfrmnl_sa*, char*, unsigned int*, char*); -extern int xfrmnl_sa_set_crypto_params (struct xfrmnl_sa*, char*, unsigned int, char*); +extern int xfrmnl_sa_set_crypto_params (struct xfrmnl_sa*, const char*, unsigned int, + const char*); extern int xfrmnl_sa_get_comp_params (struct xfrmnl_sa*, char*, unsigned int*, char*); -extern int xfrmnl_sa_set_comp_params (struct xfrmnl_sa*, char*, unsigned int, char*); +extern int xfrmnl_sa_set_comp_params (struct xfrmnl_sa*, const char*, unsigned int, + const char*); extern int xfrmnl_sa_get_encap_tmpl (struct xfrmnl_sa*, unsigned int*, unsigned int*, unsigned int*, struct nl_addr**); @@ -142,7 +144,7 @@ extern int xfrmnl_sa_set_mark (struct xfrmnl_sa*, unsigned extern int xfrmnl_sa_get_sec_ctx (struct xfrmnl_sa*, unsigned int, unsigned int, unsigned int, unsigned int, char*); extern int xfrmnl_sa_set_sec_ctx (struct xfrmnl_sa*, unsigned int, unsigned int, - unsigned int, unsigned int, char*); + unsigned int, unsigned int, const char*); extern int xfrmnl_sa_get_replay_maxage (struct xfrmnl_sa*); extern int xfrmnl_sa_set_replay_maxage (struct xfrmnl_sa*, unsigned int); |