OSSP CVS Repository

ossp - Check-in [5179]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 5179
Date: 2005-Sep-24 12:28:32 (local)
2005-Sep-24 10:28:32 (UTC)
User:rse
Branch:
Comment: Fix two incorrect casts, detected by compiling the C code under C++ constraints.
Tickets:
Inspections:
Files:
ossp-pkg/uuid/ChangeLog      1.92 -> 1.93     4 inserted, 0 deleted
ossp-pkg/uuid/uuid.c      1.55 -> 1.56     1 inserted, 1 deleted
ossp-pkg/uuid/uuid_prng.c      1.9 -> 1.10     1 inserted, 1 deleted

ossp-pkg/uuid/ChangeLog 1.92 -> 1.93

--- ChangeLog    2005/09/24 10:20:24     1.92
+++ ChangeLog    2005/09/24 10:28:32     1.93
@@ -13,6 +13,10 @@
 
   Changes between 1.3.0 and 1.3.1 (02-Sep-2005 to 24-Sep-2005)
 
+   o Fix two incorrect casts, detected by compiling the C code
+     under C++ constraints.
+     [Ralf S. Engelschall]
+
    o Remove a compiler warning in the PHP bindings.
      [Ralf S. Engelschall]
 


ossp-pkg/uuid/uuid.c 1.55 -> 1.56

--- uuid.c       2005/09/01 20:50:18     1.55
+++ uuid.c       2005/09/24 10:28:32     1.56
@@ -440,7 +440,7 @@
 
     /* determine output buffer */
     if (*data_ptr == NULL) {
-        if ((data_buf = (void *)malloc(UUID_LEN_STR+1)) == NULL)
+        if ((data_buf = (char *)malloc(UUID_LEN_STR+1)) == NULL)
             return UUID_RC_MEM;
         if (data_len != NULL)
             *data_len = UUID_LEN_STR+1;


ossp-pkg/uuid/uuid_prng.c 1.9 -> 1.10

--- uuid_prng.c  2005/09/20 20:29:10     1.9
+++ uuid_prng.c  2005/09/24 10:28:32     1.10
@@ -141,7 +141,7 @@
         /* store MD5 engine state as PRN output */
         md5_ptr = md5_buf;
         md5_len = sizeof(md5_buf);
-        if (md5_store(prng->md5, (void *)&md5_ptr, &md5_len) != MD5_RC_OK)
+        if (md5_store(prng->md5, (void **)(void *)&md5_ptr, &md5_len) != MD5_RC_OK)
             return PRNG_RC_INT;
         for (i = 0; i < MD5_LEN_BIN && n > 0; i++, n--)
             *p++ ^= md5_buf[i]; /* intentionally no assignment because arbitrary

CVSTrac 2.0.1