summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Strickroth <email@cs-ware.de>2013-11-07 17:51:43 +0100
committerSven Strickroth <email@cs-ware.de>2013-11-07 17:51:43 +0100
commit590c5efb3bab80b3e52cf68b705ef461d7388874 (patch)
tree7610c314d1e9bf5e1b2be0c27bed6da4f49cdc35
parent7dd28dde284276a09e74f66b22fe0173573d3ca7 (diff)
downloadlibgit2-590c5efb3bab80b3e52cf68b705ef461d7388874.tar.gz
Rename method
Signed-off-by: Sven Strickroth <email@cs-ware.de>
-rw-r--r--src/config_file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config_file.c b/src/config_file.c
index 1e58e3a7a..66a8c155b 100644
--- a/src/config_file.c
+++ b/src/config_file.c
@@ -1178,7 +1178,7 @@ static int write_section(git_filebuf *file, const char *key)
return result;
}
-static int needsQuote(const char *value)
+static int value_needs_surrounding_quote(const char *value)
{
const char *ptr = value;
if (*value == ' ')
@@ -1315,7 +1315,7 @@ static int config_write(diskfile_backend *cfg, const char *key, const regex_t *p
/* Then replace the variable. If the value is NULL, it
* means we want to delete it, so don't write anything. */
if (value != NULL) {
- if (needsQuote(value))
+ if (value_needs_surrounding_quote(value))
git_filebuf_printf(&file, "\t%s = \"%s\"\n", name, value);
else
git_filebuf_printf(&file, "\t%s = %s\n", name, value);
@@ -1378,7 +1378,7 @@ static int config_write(diskfile_backend *cfg, const char *key, const regex_t *p
if (reader->buffer.size > 0 && *(reader->buffer.ptr + reader->buffer.size - 1) != '\n')
git_filebuf_write(&file, "\n", 1);
- if (needsQuote(value))
+ if (value_needs_surrounding_quote(value))
git_filebuf_printf(&file, "\t%s = \"%s\"\n", name, value);
else
git_filebuf_printf(&file, "\t%s = %s\n", name, value);