Silence WARNS=4 by passing a non-const buffer to regerror(). Since it

doesn't actually use the buffer when errbuf_size == 0, pass NULL.
This commit is contained in:
tjr 2002-07-08 05:36:24 +00:00
parent 7a13ea71c7
commit 54275ff2a0

View File

@ -68,7 +68,7 @@ strregerror(errcode, preg)
if (oe != NULL)
free(oe);
s = regerror(errcode, preg, "", 0);
s = regerror(errcode, preg, NULL, 0);
if ((oe = malloc(s)) == NULL)
err(1, "malloc");
(void)regerror(errcode, preg, oe, s);