From: Nanako Shiraishi <nanako3@lavabit.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: [PATCH] config.c: make git_parse_long() static
Date: Thu, 02 Oct 2008 19:14:27 +0900 [thread overview]
Message-ID: <20081002191427.6117@nanako3.lavabit.com> (raw)
This function is not used in any other file.
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
---
cache.h | 1 -
config.c | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/cache.h b/cache.h
index de8c2b6..5a61f5e 100644
--- a/cache.h
+++ b/cache.h
@@ -742,7 +742,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 53f04a0..7d5843f 100644
--- a/config.c
+++ b/config.c
@@ -255,7 +255,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;
@@ -291,7 +291,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;
--
1.6.0.2
--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
reply other threads:[~2008-10-02 10:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081002191427.6117@nanako3.lavabit.com \
--to=nanako3@lavabit.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox