t6041: do not compress backup tar file
[gitweb.git] / shell.c
diff --git a/shell.c b/shell.c
index 5c0d47a5cc1ae85a03e40321e97ddfa859ff7e1a..ace62e4b6503d821962242f9cf3bd9af22bc39b9 100644 (file)
--- a/shell.c
+++ b/shell.c
@@ -46,11 +46,7 @@ static int is_valid_cmd_name(const char *cmd)
 
 static char *make_cmd(const char *prog)
 {
-       char *prefix = xmalloc((strlen(prog) + strlen(COMMAND_DIR) + 2));
-       strcpy(prefix, COMMAND_DIR);
-       strcat(prefix, "/");
-       strcat(prefix, prog);
-       return prefix;
+       return xstrfmt("%s/%s", COMMAND_DIR, prog);
 }
 
 static void cd_to_homedir(void)