ossp-pkg/xds/regression-tests/xds-setbuffer.c 1.2 -> 1.3
--- xds-setbuffer.c 2001/07/18 17:37:49 1.2
+++ xds-setbuffer.c 2001/07/24 15:20:17 1.3
@@ -64,16 +64,16 @@
return 1;
}
- /* Give the library a buffer of 64 byte, call the engine once, get
+ /* Give the library a buffer of 32 byte, call the engine once, get
the buffer back and see whether it has been enlarged or not. */
- buffer = malloc(64);
+ buffer_size = 32;
+ buffer = malloc(buffer_size);
if (buffer == NULL)
{
printf("Failed to allocate my memory.\n");
return 1;
}
- buffer_size = 64;
if (xds_setbuffer(xds, XDS_GIFT, buffer, buffer_size) != XDS_OK)
{
printf("xds_setbuffer() failed!\n");
@@ -89,7 +89,7 @@
printf("xds_getbuffer() failed!\n");
return 1;
}
- if (buffer_size == 64)
+ if (buffer_size < 64)
{
printf("xds_encode() did not enlarge the buffer after processing the callback\n");
printf("even though all capacity was used up!\n");
|
|