You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2006/03/02 23:58:43 UTC
svn commit: r382543 - /apr/apr/trunk/misc/unix/rand.c
Author: wrowe
Date: Thu Mar 2 14:58:41 2006
New Revision: 382543
URL: http://svn.apache.org/viewcvs?rev=382543&view=rev
Log:
The second half of the last commit. Follow the only API we found
for uuid_create and test the result value for uuid_s_ok. This matches
the configure.in tests, and is therefore safe to assume it -does- build
correctly.
Modified:
apr/apr/trunk/misc/unix/rand.c
Modified: apr/apr/trunk/misc/unix/rand.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/misc/unix/rand.c?rev=382543&r1=382542&r2=382543&view=diff
==============================================================================
--- apr/apr/trunk/misc/unix/rand.c (original)
+++ apr/apr/trunk/misc/unix/rand.c Thu Mar 2 14:58:41 2006
@@ -53,9 +53,13 @@
APR_DECLARE(apr_status_t) apr_os_uuid_get(unsigned char *uuid_data)
{
+ uint32_t rv;
uuid_t g;
- uuid_create(&g, NULL);
+ uuid_create(&g, &rv);
+
+ if (rv != uuid_s_ok)
+ APR_EGENERAL;
memcpy(uuid_data, &g, sizeof(uuid_t));