summaryrefslogtreecommitdiff
path: root/ot_config.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-25 19:42:27 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-10-25 19:42:27 +0100
commit5bc4c0663576fd99bb06068e6dfd624690865c89 (patch)
treee1e90e6966abebf960ed9c9d4ed0937be22961ff /ot_config.c
parent33b095eb26ab8be3af48d8bd034262cd5ab03a04 (diff)
Be stricter about const char*, Wwrite-strings will warn in the future and we don't want to try to overwrite string literals
Diffstat (limited to 'ot_config.c')
-rw-r--r--ot_config.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ot_config.c b/ot_config.c
index 43c07c5..e9666f9 100644
--- a/ot_config.c
+++ b/ot_config.c
@@ -22,10 +22,10 @@
22#include "ot_stats.h" 22#include "ot_stats.h"
23#include "trackerlogic.h" 23#include "trackerlogic.h"
24 24
25char *g_redirecturl; 25const char *g_redirecturl;
26char *g_serverdir; 26const char *g_serverdir;
27char *g_serveruser; 27const char *g_serveruser;
28char *g_statefile; 28const char *g_statefile;
29 29
30#define OT_LISTEN_INHERIT (-1) 30#define OT_LISTEN_INHERIT (-1)
31 31
@@ -122,13 +122,13 @@ static int listen_scan_options(char *p, int *shared, int *workers) {
122} 122}
123 123
124 124
125char *set_config_option(char **option, char *value) { 125static const char *set_config_option(const char **option, char *value) {
126#ifdef _DEBUG 126#ifdef _DEBUG
127 fprintf(stderr, "Setting config option: %s\n", value); 127 fprintf(stderr, "Setting config option: %s\n", value);
128#endif 128#endif
129 while (isspace(*value)) 129 while (isspace(*value))
130 ++value; 130 ++value;
131 free(*option); 131 free((char *)*option);
132 return *option = strdup(value); 132 return *option = strdup(value);
133} 133}
134 134