From: Frank Li Date: Wed, 16 Sep 2009 08:20:19 +0000 (+0200) Subject: Change regerror() declaration from K&R style to ANSI C (C89) X-Git-Tag: v1.6.5-rc2~23 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3f83bf3784d49e162532212230a271a8cc8edbf0;p=git.git 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 Signed-off-by: Marius Storm-Olsen Acked-by: Johannes Sixt Signed-off-by: Junio C Hamano --- diff --git a/compat/regex/regex.c b/compat/regex/regex.c index 5ea007567..67d5c370a 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;