apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/strings apr_cpystrn.c
Date Fri, 17 May 2002 14:58:27 GMT
trawick     02/05/17 07:58:27

  Modified:    strings  apr_cpystrn.c
  Log:
  don't check for malloc() failure in our strdup() replacement
  
  Submitted by:	Aaron Bannert
  Reviewed by:	Jeff Trawick
  
  Revision  Changes    Path
  1.13      +1 -3      apr/strings/apr_cpystrn.c
  
  Index: apr_cpystrn.c
  ===================================================================
  RCS file: /home/cvs/apr/strings/apr_cpystrn.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- apr_cpystrn.c	17 May 2002 11:18:58 -0000	1.12
  +++ apr_cpystrn.c	17 May 2002 14:58:27 -0000	1.13
  @@ -243,9 +243,7 @@
       char *sdup;
       size_t len = strlen(str) + 1;
   
  -    if (!(sdup = (char *) malloc(len))) {
  -        return NULL;
  -    }
  +    sdup = (char *) malloc(len);
       memcpy(sdup, str, len);
   
       return sdup;
  
  
  

Mime
View raw message