Skip to content

Commit

Permalink
Change regerror() declaration from K&R style to ANSI C (C89)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frank Li authored and Junio C Hamano committed Sep 19, 2009
1 parent 627735f commit 3f83bf3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions compat/regex/regex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3f83bf3

Please sign in to comment.