Project

General

Profile

Bug #8098 ยป test.c

Marcel Telka, 2017-04-24 11:39 AM

 
1
#include <rpc/xdr.h>
2

    
3
int
4
main(void)
5
{
6
	int r;
7
	XDR xdrs;
8
	char *p;
9

    
10
	xdrs.x_op = 10;
11

    
12
	r = xdr_hyper(&xdrs, NULL);
13
	printf("xdr_hyper: %s\n", r ? "OK" : "FAIL");
14

    
15
	r = xdr_opaque(&xdrs, NULL, 0);
16
	printf("xdr_opaque: %s\n", r ? "OK" : "FAIL");
17

    
18
	r = xdr_reference(&xdrs, &p, 0, xdr_void);
19
	printf("xdr_reference: %s\n", r ? "OK" : "FAIL");
20

    
21
	r = xdr_vector(&xdrs, NULL, 1, 0, xdr_void);
22
	printf("xdr_vector: %s\n", r ? "OK" : "FAIL");
23

    
24
	r = xdr_vector(&xdrs, NULL, 0, 0, NULL);
25
	printf("xdr_vector: %s\n", r ? "OK" : "FAIL");
26

    
27
	return 0;
28
}
    (1-1/1)