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

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sun, 3 Aug 2003 21:50:50 +0200 (CEST)

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 *".

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.

Regards
Henrik
Received on Sun Aug 03 2003 - 13:52:02 MDT

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