X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Ftools.c;h=24e27ba1bb1e843740943e5ecefd69242c9a6389;hp=77f77f0fe6741b09904f64d31ddd147871f7e40b;hb=5bfb3995da36408ded842c36052a5eadd602c431;hpb=298dc1222201440ccfbf39f59a68b37aa910ff0c diff --git a/tools/tools.c b/tools/tools.c index 77f77f0f..24e27ba1 100644 --- a/tools/tools.c +++ b/tools/tools.c @@ -15,9 +15,10 @@ #include #include #include +#include #include "tools.h" -static char *tmpdir = NULL; +static const char *tmpdir = NULL; bool tools_verbose = false; /* Ten minutes. */ @@ -176,7 +177,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 +188,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) {