--- xds_test_xdr.c 2002/03/17 10:25:53 1.10
+++ xds_test_xdr.c 2003/02/17 12:27:51 1.11
@@ -66,8 +66,7 @@
xdr_destroy(&xdrs);
/* Encode the values array using the XDS implementation. */
- xds = xds_init(XDS_ENCODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_ENCODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -102,8 +101,7 @@
/* Now we decode the values again using the XDS implementation and
compare them to our original values. Obviously, they should not
differ. */
- xds = xds_init(XDS_DECODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_DECODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -171,8 +169,7 @@
xdr_destroy(&xdrs);
/* Encode the values array using the XDS implementation. */
- xds = xds_init(XDS_ENCODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_ENCODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -207,8 +204,7 @@
/* Now we decode the values again using the XDS implementation and
compare them to our original values. Obviously, they should not
differ. */
- xds = xds_init(XDS_DECODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_DECODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -272,8 +268,7 @@
xdr_destroy(&xdrs);
/* Encode the values array using the XDS implementation. */
- xds = xds_init(XDS_ENCODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_ENCODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -308,8 +303,7 @@
/* Now we decode the values again using the XDS implementation and
compare them to our original values. Obviously, they should not
differ. */
- xds = xds_init(XDS_DECODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_DECODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -381,8 +375,7 @@
xdr_destroy(&xdrs);
/* Encode the values array using the XDS implementation. */
- xds = xds_init(XDS_ENCODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_ENCODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -417,8 +410,7 @@
/* Now we decode the values again using the XDS implementation and
compare them to our original values. Obviously, they should not
differ. */
- xds = xds_init(XDS_DECODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_DECODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -464,8 +456,7 @@
/* Encode the string as octet stream. Then erase the buffer and decode
the string back, verifying that it hasn't changed. */
- xds = xds_init(XDS_ENCODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_ENCODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -488,8 +479,7 @@
return 1;
}
- xds = xds_init(XDS_DECODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_DECODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -535,8 +525,7 @@
/* Encode the string as octet stream. Then erase the buffer and decode
the string back, verifying that it hasn't changed. */
- xds = xds_init(XDS_ENCODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_ENCODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -559,8 +548,7 @@
return 1;
}
- xds = xds_init(XDS_DECODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_DECODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -603,8 +591,7 @@
/* Encode the string as octet stream. Then erase the buffer and decode
the string back, verifying that it hasn't changed. */
- xds = xds_init(XDS_ENCODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_ENCODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -628,8 +615,7 @@
return 1;
}
- xds = xds_init(XDS_DECODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_DECODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -676,8 +662,7 @@
/* Encode the string as octet stream. Then erase the buffer and decode
the string back, verifying that it hasn't changed. */
- xds = xds_init(XDS_ENCODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_ENCODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -700,8 +685,7 @@
return 1;
}
- xds = xds_init(XDS_DECODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_DECODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -767,8 +751,7 @@
xdr_destroy(&xdrs);
/* Encode the values array using the XDS implementation. */
- xds = xds_init(XDS_ENCODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_ENCODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -803,8 +786,7 @@
/* Now we decode the values again using the XDS implementation and
compare them to our original values. Obviously, they should not
differ. */
- xds = xds_init(XDS_DECODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_DECODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -868,8 +850,7 @@
xdr_destroy(&xdrs);
/* Encode the values array using the XDS implementation. */
- xds = xds_init(XDS_ENCODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_ENCODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
@@ -904,8 +885,7 @@
/* Now we decode the values again using the XDS implementation and
compare them to our original values. Obviously, they should not
differ. */
- xds = xds_init(XDS_DECODE);
- if (xds == NULL) {
+ if (xds_init(&xds, XDS_DECODE) != XDS_OK) {
printf("Failed to initialize XDS context.\n");
return 1;
}
|