diff options
-rw-r--r-- | test/fops/file.c | 1 | ||||
-rw-r--r-- | test/fops/fops.c | 1 | ||||
-rw-r--r-- | test/utility/util.c | 7 |
3 files changed, 7 insertions, 2 deletions
diff --git a/test/fops/file.c b/test/fops/file.c index 2763afc5bca..77ce425b3f6 100644 --- a/test/fops/file.c +++ b/test/fops/file.c @@ -27,6 +27,7 @@ */ #include "thread.h" +#include "../utility/util.h" static u_int uid = 1; diff --git a/test/fops/fops.c b/test/fops/fops.c index 13bd75d7407..31c6f7f5439 100644 --- a/test/fops/fops.c +++ b/test/fops/fops.c @@ -27,6 +27,7 @@ */ #include "thread.h" +#include "../utility/util.h" static void *fop(void *); static void print_stats(u_int); diff --git a/test/utility/util.c b/test/utility/util.c index be97c7dd030..3e99ec0349c 100644 --- a/test/utility/util.c +++ b/test/utility/util.c @@ -55,10 +55,13 @@ char * testutil_workdir_from_path(char *dir) { char *buffer; + char default_dir[2] = "."; + size_t inputSize; + if (dir == NULL) { - dir = "."; + dir = default_dir; } - int inputSize = strlen(dir); + inputSize = strlen(dir); //Alloc space for a new buffer buffer = (char*) malloc (inputSize+8); |