summaryrefslogtreecommitdiff
path: root/compat/regex
diff options
context:
space:
mode:
authorFrank Li <lznuaa@gmail.com>2009-09-16 08:20:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-09-19 03:00:42 (GMT)
commit3f83bf3784d49e162532212230a271a8cc8edbf0 (patch)
tree717c5f2c5e82ff8588512afc70010fd0b329f64c /compat/regex
parent627735f9bf322c5c964b396f4a55d14e18d34aa2 (diff)
downloadgit-3f83bf3784d49e162532212230a271a8cc8edbf0.zip
git-3f83bf3784d49e162532212230a271a8cc8edbf0.tar.gz
git-3f83bf3784d49e162532212230a271a8cc8edbf0.tar.bz2
Change regerror() declaration from K&R style to ANSI C (C89)
The MSVC headers typedef errcode as int, and thus confused the compiler in the K&R style definition. ANSI style deconfuses it. Signed-off-by: Frank Li <lznuaa@gmail.com> Signed-off-by: Marius Storm-Olsen <mstormo@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/regex')
-rw-r--r--compat/regex/regex.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/compat/regex/regex.c b/compat/regex/regex.c
index 5ea0075..67d5c37 100644
--- a/compat/regex/regex.c
+++ b/compat/regex/regex.c
@@ -4852,11 +4852,8 @@ regexec (preg, string, nmatch, pmatch, eflags)
from either regcomp or regexec. We don't use PREG here. */
size_t
-regerror (errcode, preg, errbuf, errbuf_size)
- int errcode;
- const regex_t *preg;
- char *errbuf;
- size_t errbuf_size;
+regerror(int errcode, const regex_t *preg,
+ char *errbuf, size_t errbuf_size)
{
const char *msg;
size_t msg_size;