You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2002/06/21 18:36:24 UTC
cvs commit: apr/test testrand.c
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;