summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 47160e2)
raw | patch | inline | side by side (parent: 47160e2)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 30 May 2010 00:47:32 +0000 (20:47 -0400) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 30 May 2010 04:42:22 +0000 (00:42 -0400) |
tig.c | patch | blob | history |
index 32f4b648493b2bbfb4aacf16de78ff0240f22e08..b3356ed9df80a43f62be1b82c06da976fb91afe9 100644 (file)
--- a/tig.c
+++ b/tig.c
return !env || argv_from_string(argv, &argc, env);
}
+static void
+argv_free(const char *argv[])
+{
+ int argc;
+
+ for (argc = 0; argv[argc]; argc++)
+ free((void *) argv[argc]);
+}
+
/*
* Executing external commands.
view->update_secs = 0;
}
-static void
-free_argv(const char *argv[])
-{
- int argc;
-
- for (argc = 0; argv[argc]; argc++)
- free((void *) argv[argc]);
-}
-
static const char *
format_arg(const char *name)
{
@@ -3187,7 +3187,7 @@ format_argv(const char *dst_argv[], const char *src_argv[], enum format_flags fl
int argc;
bool noreplace = flags == FORMAT_NONE;
- free_argv(dst_argv);
+ argv_free(dst_argv);
for (argc = 0; src_argv[argc]; argc++) {
const char *arg = src_argv[argc];
if (format_argv(argv, req->argv, FORMAT_ALL))
open_external_viewer(argv, NULL);
- free_argv(argv);
+ argv_free(argv);
}
/*