void doit(CLIENT *cl, char *server) { char c = 1; char *resp; resp = client_rpc_xact_1(&c, cl); if (!resp) { clnt_perror(cl, server); exit(1); } if (*resp != 123) { fprintf(stderr, "lat_rpc: got bad data\n"); exit(1); } }
void doit(CLIENT *cl, char *server, char *protocol) { char c = 1; char *resp; char buf[1024]; resp = client_rpc_xact_1(&c, cl); if (!resp) { sprintf(buf, "%s/%s", server, protocol); clnt_perror(cl, buf); exit(1); } if (*resp != 123) { fprintf(stderr, "lat_rpc: got bad data\n"); exit(1); } }