From d8b87afe7c5fcee9caaef7124d5bcd5f0c3af8a1 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 14 May 2019 20:19:07 +0000 Subject: lib: hashing functions should take const arguments It doesn't make much sense for a hash function to modify its argument, so const the hash input. BGP does it in a couple places, those cast away the const. Not great but not any worse than it was. Signed-off-by: Quentin Young --- lib/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/command.c') diff --git a/lib/command.c b/lib/command.c index d6fd1fa561..b7a323e358 100644 --- a/lib/command.c +++ b/lib/command.c @@ -332,7 +332,7 @@ int argv_find(struct cmd_token **argv, int argc, const char *text, int *index) return found; } -static unsigned int cmd_hash_key(void *p) +static unsigned int cmd_hash_key(const void *p) { int size = sizeof(p); -- cgit v1.2.3