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:
Tim J. Robbins 2002-07-08 05:36:24 +00:00
parent a58b3a6878
commit 05018c64fd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99572

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);