apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@apache.org
Subject cvs commit: apr-util/test abts.c
Date Mon, 21 Jun 2004 15:18:00 GMT
dreid       2004/06/21 08:18:00

  Modified:    test     abts.c
  Log:
  Allow abts_str_equal() to handle NULL values being passed in without
  segfaulting. This should probably be applied into apr as well.
  
  Revision  Changes    Path
  1.3       +4 -1      apr-util/test/abts.c
  
  Index: abts.c
  ===================================================================
  RCS file: /home/cvs/apr-util/test/abts.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- abts.c	8 Jun 2004 00:37:44 -0000	1.2
  +++ abts.c	21 Jun 2004 15:18:00 -0000	1.3
  @@ -259,7 +259,10 @@
       update_status();
       if (tc->failed) return;
   
  -    if (!strcmp(expected, actual)) return;
  +    /* If both are NULL, match is good */
  +    if (!expected && !actual) return;
  +    if (expected && actual)
  +        if (!strcmp(expected, actual)) return;
   
       tc->failed = TRUE;
       if (verbose) {
  
  
  

Mime
View raw message