apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/test abts.c
Date Mon, 24 May 2004 12:54:25 GMT
jorton      2004/05/24 05:54:25

  Modified:    test     abts.c
  Log:
  * test/abts.c (abts_add_suite): Use calloc/memcpy rather than
  strndup.
  
  Revision  Changes    Path
  1.7       +2 -1      apr/test/abts.c
  
  Index: abts.c
  ===================================================================
  RCS file: /home/cvs/apr/test/abts.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -d -u -r1.6 -r1.7
  --- abts.c	24 May 2004 12:45:29 -0000	1.6
  +++ abts.c	24 May 2004 12:54:25 -0000	1.7
  @@ -102,7 +102,8 @@
       subsuite->next = NULL;
       p = strchr(suite_name, '.');
       if (p)
  -        subsuite->name = strndup(suite_name, p - suite_name);
  +        subsuite->name = memcpy(calloc(p - suite_name + 1, 1),
  +                                suite_name, p - suite_name);
       else
           subsuite->name = suite_name;
       subsuite->not_run = 0;
  
  
  

Mime
View raw message