diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-11-11 21:08:03 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-07 14:25:46 -0800 |
commit | edc54fb5d4ce6774fc2ac76779bd57dc2d6ab189 (patch) | |
tree | 5d95bd32dc8e15db507f9c268c4a4c8a0ed346c3 /setup.c | |
parent | 309be813c9b75fed70f3a03bf803bf47c6670cfc (diff) | |
download | git-edc54fb5d4ce6774fc2ac76779bd57dc2d6ab189.tar.gz |
Make prefix_path() return char* without const
prefix_path() allocates new buffer. There's no reason for it to keep
the buffer for itself and waste memory.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'setup.c')
-rw-r--r-- | setup.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -4,7 +4,7 @@ static int inside_git_dir = -1; static int inside_work_tree = -1; -const char *prefix_path(const char *prefix, int len, const char *path) +char *prefix_path(const char *prefix, int len, const char *path) { const char *orig = path; char *sanitized = xmalloc(len + strlen(path) + 1); |