diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-03-06 20:44:17 -0500 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-03-07 10:47:10 -0800 |
commit | 3a55602eeca4ac8670e8698a7187e18b95683344 (patch) | |
tree | 625a8af9c4655ace00b275c3e272c2764db3bcb8 /environment.c | |
parent | Don't build external_grep if its not used (diff) | |
download | tgif-3a55602eeca4ac8670e8698a7187e18b95683344.tar.xz |
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 'environment.c')
-rw-r--r-- | environment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/environment.c b/environment.c index 49486dd9f1..0151ad0722 100644 --- a/environment.c +++ b/environment.c @@ -21,7 +21,7 @@ int log_all_ref_updates = -1; /* unspecified */ int warn_ambiguous_refs = 1; int repository_format_version; char *git_commit_encoding; -char *git_log_output_encoding; +const char *git_log_output_encoding; int shared_repository = PERM_UMASK; const char *apply_default_whitespace; int zlib_compression_level = Z_DEFAULT_COMPRESSION; |