summaryrefslogtreecommitdiff
path: root/setup.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-09-21 00:00:47 -0700
committerJunio C Hamano <junkio@cox.net>2005-09-24 23:50:43 -0700
commit6b5ee137e56af8093391411389dd4b18416707ec (patch)
treeca7f7ea853bc836e1b41a52301884f3d41708c2a /setup.c
parentdbc37438687e110697574d175e4eca5f9cbeae81 (diff)
downloadgit-6b5ee137e56af8093391411389dd4b18416707ec.tar.gz
Diff clean-up.
This is a long overdue clean-up to the code for parsing and passing diff options. It also tightens some constness issues. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/setup.c b/setup.c
index 3973668f01..9e20160d94 100644
--- a/setup.c
+++ b/setup.c
@@ -1,8 +1,8 @@
#include "cache.h"
-char *prefix_path(const char *prefix, int len, char *path)
+const char *prefix_path(const char *prefix, int len, const char *path)
{
- char *orig = path;
+ const char *orig = path;
for (;;) {
char c;
if (*path != '.')
@@ -47,10 +47,10 @@ char *prefix_path(const char *prefix, int len, char *path)
return path;
}
-const char **get_pathspec(const char *prefix, char **pathspec)
+const char **get_pathspec(const char *prefix, const char **pathspec)
{
- char *entry = *pathspec;
- char **p;
+ const char *entry = *pathspec;
+ const char **p;
int prefixlen;
if (!prefix && !entry)