apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/test testrand.c
Date Fri, 21 Jun 2002 16:36:24 GMT
trawick     2002/06/21 09:36:24

  Modified:    test     testrand.c
  Log:
  improve error reporting
  
  Revision  Changes    Path
  1.3       +6 -2      apr/test/testrand.c
  
  Index: testrand.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testrand.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- testrand.c	13 Mar 2002 20:39:27 -0000	1.2
  +++ testrand.c	21 Jun 2002 16:36:24 -0000	1.3
  @@ -81,9 +81,13 @@
           printf("%-5d %-55s", i * 255, "bytes");
           rv = apr_generate_random_bytes(c, i * 255);
           if (rv != APR_SUCCESS) {
  -            printf("Failed: %d\n", rv);
  +            char msgbuf[120];
  +
  +            printf("Failed: %d %s\n", rv, apr_strerror(rv, msgbuf, sizeof msgbuf));
  +        }
  +        else {
  +            printf("OK\n");
           }
  -        printf("OK\n");
       }
   
       return 0;
  
  
  

Mime
View raw message