Il 21.50 03/08/2003 Henrik Nordstrom ha scritto:
On Sun, 3 Aug 2003, Guido Serassio wrote:
> if (!s) { > if (!re_comp_buf.buffer) > - return "No previous regular expression"; > + return (char *) "No previous regular expression"; > return 0;
In cases like this you better change the return type instead of casting constants.. casting should be avoided where not needed.
The return type in functions like this should be "const char *".
Thanks for the hint, just applied on nt branch.
In fact, the re_comp routine is not even used and can be killed entirely, no point in trying to make a function we do not use behave. Squid uses the POSIX interface, and have no interest in a 4.2 BSD interface to regex.. lets kill that stale code so we don't need to see it again.
Now I'm testing the build process, as I have time, i will "purify" GNUregex.c
Regards
Guido
Regards Henrik
- ======================================================== Guido Serassio Acme Consulting S.r.l. Via Gorizia, 69 10136 - Torino - ITALY Tel. : +39.011.3249426 Fax. : +39.011.3293665 Email: [EMAIL PROTECTED] WWW: http://www.acmeconsulting.it/
