This patch is necessary to avoid that the next patch introduces a
warning.
---
 include/net-snmp/library/snmp_transport.h | 4 ++--
 snmplib/snmp_transport.c                  | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/net-snmp/library/snmp_transport.h 
b/include/net-snmp/library/snmp_transport.h
index 5c7e7d681551..e361624a4566 100644
--- a/include/net-snmp/library/snmp_transport.h
+++ b/include/net-snmp/library/snmp_transport.h
@@ -364,8 +364,8 @@ NETSNMP_IMPORT
 int netsnmp_transport_config_compare(netsnmp_transport_config *left,
                                      netsnmp_transport_config *right);
 NETSNMP_IMPORT
-netsnmp_transport_config *netsnmp_transport_create_config(char *key,
-                                                          char *value);
+netsnmp_transport_config *netsnmp_transport_create_config(const char *key,
+                                                          const char *value);
 
 #ifndef NETSNMP_FEATURE_REMOVE_FILTER_SOURCE
 NETSNMP_IMPORT
diff --git a/snmplib/snmp_transport.c b/snmplib/snmp_transport.c
index d7e9662088f2..72a3ae046d50 100644
--- a/snmplib/snmp_transport.c
+++ b/snmplib/snmp_transport.c
@@ -974,7 +974,8 @@ netsnmp_transport_config_compare(netsnmp_transport_config 
*left,
 }
 
 netsnmp_transport_config *
-netsnmp_transport_create_config(char *key, char *value) {
+netsnmp_transport_create_config(const char *key, const char *value)
+{
     netsnmp_transport_config *entry =
         SNMP_MALLOC_TYPEDEF(netsnmp_transport_config);
     entry->key = strdup(key);
-- 
2.17.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to