Re: [Squid-cvs] nt squid3/lib GNUregex.c,1.1.2.1,1.1.2.2

From: Serassio Guido <guido.serassio@dont-contact.us>
Date: Sun, 03 Aug 2003 22:44:22 +0200

Hi Henrik,

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: guido.serassio@acmeconsulting.it
WWW: http://www.acmeconsulting.it/
Received on Sun Aug 03 2003 - 14:46:02 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:26 MST