@matheusbsbs / matheus-bagliano / commits / 0433bcd9f0
Fork 0

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>

Nanako Shiraishi committed Oct 2, 2008 at 19:14 UTC 0433bcd9f01b9113a02831c13e364c6a89a0047a
2 files changed +2 -3
cache.h
-1
@@ -749,7 +749,6 @@ typedef int (*config_fn_t)(const char *, const char *, void *);
749 extern int git_default_config(const char *, const char *, void *);
750 extern int git_config_from_file(config_fn_t fn, const char *, void *);
751 extern int git_config(config_fn_t fn, void *);
752 -extern int git_parse_long(const char *, long *);
752 extern int git_parse_ulong(const char *, unsigned long *);
753 extern int git_config_int(const char *, const char *);
754 extern unsigned long git_config_ulong(const char *, const char *);
config.c
+2 -2
@@ -274,7 +274,7 @@ static int parse_unit_factor(const char *end, unsigned long *val)
274 return 0;
275 }
276
277 -int git_parse_long(const char *value, long *ret)
277 +static int git_parse_long(const char *value, long *ret)
278 {
279 if (value && *value) {
280 char *end;
@@ -310,7 +310,7 @@ static void die_bad_config(const char *name)
310
311 int git_config_int(const char *name, const char *value)
312 {
313 - long ret;
313 + long ret = 0;
314 if (!git_parse_long(value, &ret))
315 die_bad_config(name);
316 return ret;