OSSP CVS Repository

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

Check-in Number: 4226
Date: 2001-Jul-20 12:07:11 (local)
2001-Jul-20 10:07:11 (UTC)
User:simons
Branch:
Comment: Added casts to get rid of warnings.
Tickets:
Inspections:
Files:
ossp-pkg/xds/xdr-encode-octetstream.c      1.1 -> 1.2     1 inserted, 1 deleted
ossp-pkg/xds/xdr-encode-string.c      1.1 -> 1.2     2 inserted, 2 deleted

ossp-pkg/xds/xdr-encode-octetstream.c 1.1 -> 1.2

--- xdr-encode-octetstream.c     2001/07/20 09:22:25     1.1
+++ xdr-encode-octetstream.c     2001/07/20 10:07:11     1.2
@@ -63,7 +63,7 @@
         ((u_int8_t*)buffer)[2] = (p_len >>  8) & 0x000000ff;
         ((u_int8_t*)buffer)[3] = (p_len >>  0) & 0x000000ff;
         memmove((u_int8_t*)buffer+4, p, p_len);
-        memset(buffer+4+p_len, 0, padding);
+        memset((u_int8_t*)buffer+4+p_len, 0, padding);
         }
 
     /* Done. */


ossp-pkg/xds/xdr-encode-string.c 1.1 -> 1.2

--- xdr-encode-string.c  2001/07/19 15:13:39     1.1
+++ xdr-encode-string.c  2001/07/20 10:07:11     1.2
@@ -50,7 +50,7 @@
 
     p       = (u_int8_t*)va_arg(*args, void*);
     assert(p != NULL);
-    p_len   = strlen(p);
+    p_len   = strlen((char*)p);
     padding = (4 - (p_len & 0x03)) & 0x03;
     assert((p_len + padding) % 4 == 0);
 
@@ -63,7 +63,7 @@
         ((u_int8_t*)buffer)[2] = (p_len >>  8) & 0x000000ff;
         ((u_int8_t*)buffer)[3] = (p_len >>  0) & 0x000000ff;
         memmove((u_int8_t*)buffer+4, p, p_len);
-        memset(buffer+4+p_len, 0, padding);
+        memset((u_int8_t*)buffer+4+p_len, 0, padding);
         }
 
     /* Done. */

CVSTrac 2.0.1