]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
server: Make argument of user_list_init() constant.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 31 Dec 2017 22:37:16 +0000 (23:37 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 13 Mar 2018 02:28:56 +0000 (03:28 +0100)
The function does not modify the memory pointed to by user_list_file.

user_list.c
user_list.h

index 18b489b9e4c615824822feb801e3820df63ef554..030865fad614a3a9b2b190da0e3cf1d9ceb94a25 100644 (file)
@@ -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");
index 3bc98f687b12364a671da05c1629b39fdea7a8c3..1cb94764cca42341e9a48b576491e12a5630d888 100644 (file)
@@ -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);