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:
authorNanako Shiraishi <nanako3@lavabit.com>2008-10-02 14:14:27 +0400
committerShawn O. Pearce <spearce@spearce.org>2008-10-03 05:03:35 +0400
commit0433bcd9f01b9113a02831c13e364c6a89a0047a (patch)
tree45d1ea4a2176a496e00e75e0213ba28a9a7c7dc1
parent7996ff335e675b229398974f6cbf459843c9bf6d (diff)
config.c: make git_parse_long() static
This function is not used in any other file. Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--cache.h1
-rw-r--r--config.c4
2 files changed, 2 insertions, 3 deletions
diff --git a/cache.h b/cache.h
index 99af83a047..7027c896bf 100644
--- a/cache.h
+++ b/cache.h
@@ -749,7 +749,6 @@ typedef int (*config_fn_t)(const char *, const char *, void *);
extern int git_default_config(const char *, const char *, void *);
extern int git_config_from_file(config_fn_t fn, const char *, void *);
extern int git_config(config_fn_t fn, void *);
-extern int git_parse_long(const char *, long *);
extern int git_parse_ulong(const char *, unsigned long *);
extern int git_config_int(const char *, const char *);
extern unsigned long git_config_ulong(const char *, const char *);
diff --git a/config.c b/config.c
index 1d3012047d..18d305c890 100644
--- a/config.c
+++ b/config.c
@@ -274,7 +274,7 @@ static int parse_unit_factor(const char *end, unsigned long *val)
return 0;
}
-int git_parse_long(const char *value, long *ret)
+static int git_parse_long(const char *value, long *ret)
{
if (value && *value) {
char *end;
@@ -310,7 +310,7 @@ static void die_bad_config(const char *name)
int git_config_int(const char *name, const char *value)
{
- long ret;
+ long ret = 0;
if (!git_parse_long(value, &ret))
die_bad_config(name);
return ret;