From 46298a23a07f8bbce684a294b4089e9d88617421 Mon Sep 17 00:00:00 2001 From: Michael Ortmann Date: Sun, 15 Mar 2026 11:21:52 +0100 Subject: [PATCH 1/2] Fix const qualifier --- src/misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/misc.c b/src/misc.c index f5f2fe61c..d464945c0 100644 --- a/src/misc.c +++ b/src/misc.c @@ -310,7 +310,8 @@ char *newsplit(char **rest) void maskaddr(const char *s, char *nw, int type) { int d = type % 5, num = 1; - char *p, *u = 0, *h = 0, *ss; + const char *p, *u = 0, *h = 0; + char *ss; /* Look for user and host.. */ ss = (char *)s; From 6164ca0117c7986402016668ea91cb4f7c3ac3e6 Mon Sep 17 00:00:00 2001 From: Michael Ortmann Date: Sun, 15 Mar 2026 20:46:25 +0100 Subject: [PATCH 2/2] More, for make debug --- src/mem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mem.c b/src/mem.c index a819cbfc4..60541e718 100644 --- a/src/mem.c +++ b/src/mem.c @@ -335,7 +335,7 @@ void *n_malloc(int size, const char *file, int line) #ifdef DEBUG_MEM size_t size2; int i = 0; - char *p; + const char *p; #endif x = (void *) malloc(size); @@ -378,7 +378,7 @@ void *n_realloc(void *ptr, int size, const char *file, int line) void *x; #ifdef DEBUG_MEM int i = 0; - char *p; + const char *p; #endif /* ptr == NULL is valid. Avoiding duplicate code further down */