venus: Remove dedebug
[openafs.git] / tests / cmd / command-t.c
index 19c9f7f..4252648 100644 (file)
@@ -34,6 +34,7 @@
 #include <afs/cmd.h>
 
 #include <tests/tap/basic.h>
+#include "common.h"
 
 enum cmdOptions {
    copt_flag = 0,
@@ -72,6 +73,7 @@ checkList(struct cmd_item *list, ...)
        list = list->next;
        el = va_arg(ap, char *);
     }
+    va_end(ap);
 
     if (el == NULL && list == NULL) {
        ok(1, "List has correct number of elements");
@@ -360,11 +362,7 @@ main(int argc, char **argv)
     cmd_FreeArgv(tv);
 
     /* Now, try adding a configuration file into the mix */
-    if (getenv("SOURCE") == NULL)
-       path = strdup("test1.conf");
-    else
-       asprintf(&path, "%s/cmd/test1.conf", getenv("SOURCE"));
-
+    path = afstest_src_path("tests/cmd/test1.conf");
     cmd_SetCommandName("test");
     code = cmd_OpenConfigFile(path);
     is_int(0, code, "cmd_OpenConfigFile succeeds");