[prev in list] [next in list] [prev in thread] [next in thread]
List: apr-cvs
Subject: cvs commit: apr/test abts.c
From: jorton () apache ! org
Date: 2004-05-24 12:54:25
Message-ID: 20040524125425.80187.qmail () minotaur ! apache ! org
[Download RAW message or body]
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;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic