ossp-pkg/xds/regression-tests/xdr-string.c 1.4 -> 1.5
--- xdr-string.c 2001/08/02 11:52:12 1.4
+++ xdr-string.c 2001/08/08 09:19:34 1.5
@@ -90,12 +90,12 @@
printf("xds_decode() failed.\n");
return 1;
}
- if (strlen(new_msg) != strlen(msg))
+ if (strlen(new_msg) != sizeof(msg)-1)
{
printf("The size of the decoded message is wrong.\n");
return 1;
}
- if (memcmp(msg, new_msg, strlen(new_msg)) != 0)
+ if (memcmp(msg, new_msg, sizeof(msg)-1) != 0)
{
printf("The decoded string is not correct.\n");
return 1;
|
|