]> git.ozlabs.org Git - ccan/blobdiff - tools/tools.c
tools: fix up warnings with -Wwrite-strings.
[ccan] / tools / tools.c
index 77f77f0fe6741b09904f64d31ddd147871f7e40b..09cc3d3a17b362b324b99d5ef20fc922d885ff36 100644 (file)
@@ -17,7 +17,7 @@
 #include <assert.h>
 #include "tools.h"
 
-static char *tmpdir = NULL;
+static const char *tmpdir = NULL;
 bool tools_verbose = false;
 
 /* Ten minutes. */
@@ -176,7 +176,7 @@ bool run_command(const void *ctx, unsigned int *time_ms, char **output,
        return false;
 }
 
-static int unlink_all(char *dir)
+static int unlink_all(const char *dir)
 {
        char cmd[strlen(dir) + sizeof("rm -rf ")];
        sprintf(cmd, "rm -rf %s", dir);
@@ -187,7 +187,7 @@ static int unlink_all(char *dir)
        return 0;
 }
 
-char *temp_dir(const void *ctx)
+const char *temp_dir(const void *ctx)
 {
        /* For first call, create dir. */
        while (!tmpdir) {