You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Stanley Gambarin <st...@cs.bu.edu> on 1997/07/23 17:23:05 UTC

small fixes


	(a) pstrcat - if no arguments specified, return NULL

*** alloc.c	Wed Jul 23 11:19:55 1997
--- alloc.c.old	Wed Jul 23 11:17:53 1997
***************
*** 432,440 ****
  
    /* Allocate the required string */
  
-   if (0 == len) {
-       return NULL;
-   }
    res = (char *)palloc(a, len + 1);
    cp = res;
  
--- 432,437 ----


	(b) all module should refere to pool, not struct pool (only
	nod_include misbehaves)

*** mod_include.c	Wed Jul 23 11:18:22 1997
--- mod_include.c.old	Wed Jul 23 11:18:02 1997
***************
*** 1054,1065 ****
      } *root, *current, *new;
      char *parse;
      char buffer[MAX_STRING_LEN];
!     pool *expr_pool;
      int retval = 0;
  
      if ((parse = expr) == (char *)NULL) return(0);
      root = current = (struct parse_node*)NULL;
!     if ((expr_pool = make_sub_pool(r->pool)) == (pool *)NULL) {
          log_printf(r->server, "out of memory", r->filename);
          rputs(error, r);
          return(0);
--- 1054,1065 ----
      } *root, *current, *new;
      char *parse;
      char buffer[MAX_STRING_LEN];
!     struct pool *expr_pool;
      int retval = 0;
  
      if ((parse = expr) == (char *)NULL) return(0);
      root = current = (struct parse_node*)NULL;
!     if ((expr_pool = make_sub_pool(r->pool)) == (struct pool *)NULL) {
          log_printf(r->server, "out of memory", r->filename);
          rputs(error, r);
          return(0);





Re: small fixes

Posted by ra...@bellglobal.com.
>      (a) pstrcat - if no arguments specified, return NULL
> 
> *** alloc.c     Wed Jul 23 11:19:55 1997
> --- alloc.c.old     Wed Jul 23 11:17:53 1997
> ***************
> *** 432,440 ****
>   
>     /* Allocate the required string */
>   
> -   if (0 == len) {
> -       return NULL;
> -   }
>     res = (char *)palloc(a, len + 1);
>     cp = res;

These backward patches are really bloody confusing.

-Rasmus