diff mbox series

[ovs-dev,2/3] smap: Make argument of smap_add_ipv6 constant.

Message ID 20230520003120.1070717-3-i.maximets@ovn.org
State Accepted
Commit 0c4b299ebb2b455064ba9199aedefd3b99e0040b
Headers show
Series netdev-vport: Fix tunnel config thread safety. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Ilya Maximets May 20, 2023, 12:31 a.m. UTC
The address is not getting modified inside.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---
 lib/smap.c | 2 +-
 lib/smap.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Horman May 25, 2023, 11:51 a.m. UTC | #1
On Sat, May 20, 2023 at 02:31:19AM +0200, Ilya Maximets wrote:
> The address is not getting modified inside.
> 
> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>

Reviewed-by: Simon Horman <simon.horman@corigine.com>
diff mbox series

Patch

diff --git a/lib/smap.c b/lib/smap.c
index c1633e2a1..47fb34502 100644
--- a/lib/smap.c
+++ b/lib/smap.c
@@ -100,7 +100,7 @@  smap_add_format(struct smap *smap, const char *key, const char *format, ...)
 /* Adds 'key' paired with a string representation of 'addr'. It is the
  * caller's responsibility to avoid duplicate keys if desirable. */
 void
-smap_add_ipv6(struct smap *smap, const char *key, struct in6_addr *addr)
+smap_add_ipv6(struct smap *smap, const char *key, const struct in6_addr *addr)
 {
     char buf[INET6_ADDRSTRLEN];
     ipv6_string_mapped(buf, addr);
diff --git a/lib/smap.h b/lib/smap.h
index 2fe6c540a..d1d2ae6f2 100644
--- a/lib/smap.h
+++ b/lib/smap.h
@@ -100,7 +100,7 @@  struct smap_node *smap_add_nocopy(struct smap *, char *, char *);
 bool smap_add_once(struct smap *, const char *, const char *);
 void smap_add_format(struct smap *, const char *key, const char *, ...)
     OVS_PRINTF_FORMAT(3, 4);
-void smap_add_ipv6(struct smap *, const char *, struct in6_addr *);
+void smap_add_ipv6(struct smap *, const char *, const struct in6_addr *);
 void smap_replace(struct smap *, const char *, const char *);
 void smap_replace_nocopy(struct smap *, const char *, char *);