diff mbox series

[1/2] iw: Make input to mac_addr_n2a() const

Message ID 20181010204747.1555-1-hauke@hauke-m.de (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show
Series [1/2] iw: Make input to mac_addr_n2a() const | expand

Commit Message

Hauke Mehrtens Oct. 10, 2018, 8:47 p.m. UTC
The parameter is not modified, so we can make it constant. This makes it
possible to provide other const parameters to this function.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 iw.h   | 2 +-
 util.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/iw.h b/iw.h
index 47aa27d..bdd39ee 100644
--- a/iw.h
+++ b/iw.h
@@ -175,7 +175,7 @@  int valid_handler(struct nl_msg *msg, void *arg);
 void register_handler(int (*handler)(struct nl_msg *, void *), void *data);
 
 int mac_addr_a2n(unsigned char *mac_addr, char *arg);
-void mac_addr_n2a(char *mac_addr, unsigned char *arg);
+void mac_addr_n2a(char *mac_addr, const unsigned char *arg);
 int parse_hex_mask(char *hexmask, unsigned char **result, size_t *result_len,
 		   unsigned char **mask);
 unsigned char *parse_hex(char *hex, size_t *outlen);
diff --git a/util.c b/util.c
index 5b286b7..796549e 100644
--- a/util.c
+++ b/util.c
@@ -5,7 +5,7 @@ 
 #include "iw.h"
 #include "nl80211.h"
 
-void mac_addr_n2a(char *mac_addr, unsigned char *arg)
+void mac_addr_n2a(char *mac_addr, const unsigned char *arg)
 {
 	int i, l;