From 0e5dedaa7f494adcd2970c301343fc04933fae72 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 31 Dec 2017 23:37:16 +0100 Subject: [PATCH 1/1] server: Make argument of user_list_init() constant. The function does not modify the memory pointed to by user_list_file. --- user_list.c | 2 +- user_list.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/user_list.c b/user_list.c index 18b489b9..030865fa 100644 --- a/user_list.c +++ b/user_list.c @@ -67,7 +67,7 @@ void user_list_deplete(void) * * This function either succeeds or calls exit(3). */ -void user_list_init(char *user_list_file) +void user_list_init(const char *user_list_file) { int ret = -E_USERLIST; FILE *file_ptr = fopen(user_list_file, "r"); diff --git a/user_list.h b/user_list.h index 3bc98f68..1cb94764 100644 --- a/user_list.h +++ b/user_list.h @@ -32,6 +32,6 @@ struct user { unsigned int perms; }; -void user_list_init(char *user_list_file); +void user_list_init(const char *user_list_file); void user_list_deplete(void); const struct user *user_list_lookup(const char *name); -- 2.39.2