OSSP CVS Repository

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

Check-in Number: 4257
Date: 2001-Aug-01 14:02:28 (local)
2001-Aug-01 12:02:28 (UTC)
User:simons
Branch:callback-semantic-rewrite
Comment: Use memcmp() instead of strcmp() because we can't rely on trailing zero bytes.
Tickets:
Inspections:
Files:
ossp-pkg/xds/regression-tests/xdr-octetstream-empty.c      1.1->removed
ossp-pkg/xds/regression-tests/xdr-octetstream.c      1.1 -> 1.1.2.1     1 inserted, 1 deleted
ossp-pkg/xds/regression-tests/xdr-string-empty.c      1.2 -> 1.2.2.1     1 inserted, 1 deleted
ossp-pkg/xds/regression-tests/xdr-string.c      1.2 -> 1.2.2.1     1 inserted, 1 deleted

ossp-pkg/xds/regression-tests/xdr-octetstream-empty.c 1.1 -> 1.1.2.1

--- xdr-octetstream-empty.c      2001/07/20 09:22:26     1.1
+++ xdr-octetstream-empty.c      2001/08/01 12:02:28     1.1.2.1
@@ -96,7 +96,7 @@
         printf("The size of the decoded message is wrong.\n");
         return 1;
         }
-    if (strncmp(msg, new_msg, new_msg_size) != 0)
+    if (memcmp(msg, new_msg, new_msg_size) != 0)
         {
         printf("The decoded octet stream is not correct.\n");
         return 1;


ossp-pkg/xds/regression-tests/xdr-octetstream.c 1.1 -> 1.1.2.1

--- xdr-octetstream.c    2001/07/20 09:22:26     1.1
+++ xdr-octetstream.c    2001/08/01 12:02:28     1.1.2.1
@@ -96,7 +96,7 @@
         printf("The size of the decoded message is wrong.\n");
         return 1;
         }
-    if (strncmp(msg, new_msg, new_msg_size) != 0)
+    if (memcmp(msg, new_msg, new_msg_size) != 0)
         {
         printf("The decoded octet stream is not correct.\n");
         return 1;


ossp-pkg/xds/regression-tests/xdr-string-empty.c 1.2 -> 1.2.2.1

--- xdr-string-empty.c   2001/07/20 09:22:26     1.2
+++ xdr-string-empty.c   2001/08/01 12:02:40     1.2.2.1
@@ -96,7 +96,7 @@
         printf("The size of the decoded message is wrong.\n");
         return 1;
         }
-    if (strncmp(msg, new_msg, new_msg_size) != 0)
+    if (memcmp(msg, new_msg, new_msg_size) != 0)
         {
         printf("The decoded string is not correct.\n");
         return 1;


ossp-pkg/xds/regression-tests/xdr-string.c 1.2 -> 1.2.2.1

--- xdr-string.c 2001/07/20 09:22:26     1.2
+++ xdr-string.c 2001/08/01 12:02:40     1.2.2.1
@@ -96,7 +96,7 @@
         printf("The size of the decoded message is wrong: %d.\n", new_msg_size);
         return 1;
         }
-    if (strncmp(msg, new_msg, new_msg_size) != 0)
+    if (memcmp(msg, new_msg, new_msg_size) != 0)
         {
         printf("The decoded string is not correct.\n");
         return 1;

CVSTrac 2.0.1