]> git.proxmox.com Git - pve-cluster.git/commitdiff
token IPC: mark pointed data as const when only pointer is mutable
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 27 Jan 2020 17:23:40 +0000 (18:23 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 27 Jan 2020 17:24:04 +0000 (18:24 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
data/src/server.c

index 8519001d4bd2c6bb2c255be91c94bb2604c009e2..90c9eed652483e0e466014e035b7ae52b78f549a 100644 (file)
@@ -371,8 +371,8 @@ static int32_t s1_msg_process_fn(
                        int bytes_read = memdb_read(memdb, "priv/token.cfg", &tmp);
                        size_t remaining = bytes_read > 0 ? bytes_read : 0;
                        if (tmp != NULL && remaining >= tokenlen) {
-                               char *line = (char *) tmp;
-                               char *next_line;
+                               const char *line = (char *) tmp;
+                               const char *next_line;
                                const char *const end = line + remaining;
                                size_t linelen;