X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Ftools.c;h=09cc3d3a17b362b324b99d5ef20fc922d885ff36;hb=e5d378237fd2c9dd0c710bed9d8f9e1538de6d02;hp=77f77f0fe6741b09904f64d31ddd147871f7e40b;hpb=298dc1222201440ccfbf39f59a68b37aa910ff0c;p=ccan diff --git a/tools/tools.c b/tools/tools.c index 77f77f0f..09cc3d3a 100644 --- a/tools/tools.c +++ b/tools/tools.c @@ -17,7 +17,7 @@ #include #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) {