Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-03-07 04:44:17 +0300
committerJunio C Hamano <junkio@cox.net>2007-03-07 21:47:10 +0300
commit3a55602eeca4ac8670e8698a7187e18b95683344 (patch)
tree625a8af9c4655ace00b275c3e272c2764db3bcb8 /cache.h
parentff1f99453f1fe2fd9470f6ea268aed5a1839bd09 (diff)
General const correctness fixes
We shouldn't attempt to assign constant strings into char*, as the string is not writable at runtime. Likewise we should always be treating unsigned values as unsigned values, not as signed values. Most of these are very straightforward. The only exception is the (unnecessary) xstrdup/free in builtin-branch.c for the detached head case. Since this is a user-level interactive type program and that particular code path is executed no more than once, I feel that the extra xstrdup call is well worth the easy elimination of this warning. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index c291163e6d..f3d7538aab 100644
--- a/cache.h
+++ b/cache.h
@@ -451,7 +451,7 @@ extern char git_default_email[MAX_GITNAME];
extern char git_default_name[MAX_GITNAME];
extern char *git_commit_encoding;
-extern char *git_log_output_encoding;
+extern const char *git_log_output_encoding;
extern int copy_fd(int ifd, int ofd);
extern int read_in_full(int fd, void *buf, size_t count);