--------------------- PatchSet 8575 Date: 2006/08/31 06:03:33 Author: adri Branch: parserwork Tag: (none) Log: Optimise out a strdup/free. Members: include/util.h:1.13->1.13.32.1 lib/rfc1123.c:1.9->1.9.18.1 src/HttpHeader.c:1.23.4.1->1.23.4.2 Index: squid/include/util.h =================================================================== RCS file: /cvsroot/squid-sf//squid/include/util.h,v retrieving revision 1.13 retrieving revision 1.13.32.1 diff -u -r1.13 -r1.13.32.1 --- squid/include/util.h 12 May 2006 22:51:56 -0000 1.13 +++ squid/include/util.h 31 Aug 2006 06:03:33 -0000 1.13.32.1 @@ -1,5 +1,5 @@ /* - * $Id: util.h,v 1.13 2006/05/12 22:51:56 squidadm Exp $ + * $Id: util.h,v 1.13.32.1 2006/08/31 06:03:33 adri Exp $ * * AUTHOR: Harvest Derived * @@ -52,6 +52,10 @@ #define _etext etext #endif +#ifndef MIN +#define MIN(a,b) (atm_isdst = -1; Index: squid/src/HttpHeader.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/HttpHeader.c,v retrieving revision 1.23.4.1 retrieving revision 1.23.4.2 diff -u -r1.23.4.1 -r1.23.4.2 --- squid/src/HttpHeader.c 23 Aug 2006 14:36:54 -0000 1.23.4.1 +++ squid/src/HttpHeader.c 31 Aug 2006 06:03:34 -0000 1.23.4.2 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.c,v 1.23.4.1 2006/08/23 14:36:54 adri Exp $ + * $Id: HttpHeader.c,v 1.23.4.2 2006/08/31 06:03:34 adri Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -1030,7 +1030,7 @@ assert_eid(id); assert(Headers[id].type == ftDate_1123); /* must be of an appropriate type */ if ((e = httpHeaderFindEntry(hdr, id))) { - value = parse_rfc1123(strBuf(e->value)); + value = parse_rfc1123(strBuf(e->value), strLen(e->value)); httpHeaderNoteParsedEntry(e->id, e->value, value < 0); } return value; @@ -1148,7 +1148,7 @@ tot.valid = 1; } else { /* or maybe it is time? */ - tot.time = parse_rfc1123(str); + tot.time = parse_rfc1123(str, strLen(e->value)); if (tot.time >= 0) tot.valid = 1; tot.tag = NULL;