diff options
Diffstat (limited to 'nis/yp_xdr.c')
-rw-r--r-- | nis/yp_xdr.c | 129 |
1 files changed, 44 insertions, 85 deletions
diff --git a/nis/yp_xdr.c b/nis/yp_xdr.c index f962c4dfcc..0ee80126e8 100644 --- a/nis/yp_xdr.c +++ b/nis/yp_xdr.c @@ -33,60 +33,53 @@ bool_t xdr_ypstat (XDR *xdrs, ypstat *objp) { - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; + return xdr_enum (xdrs, (enum_t *) objp); } +libnsl_hidden_def (xdr_ypstat) bool_t xdr_ypxfrstat (XDR *xdrs, ypxfrstat *objp) { - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; + return xdr_enum (xdrs, (enum_t *) objp); } +libnsl_hidden_def (xdr_ypxfrstat) bool_t xdr_domainname (XDR *xdrs, domainname *objp) { - if (!xdr_string (xdrs, objp, ~0)) - return FALSE; - return TRUE; + return xdr_string (xdrs, objp, ~0); } +libnsl_hidden_def (xdr_domainname) bool_t xdr_mapname (XDR *xdrs, mapname *objp) { - if (!xdr_string (xdrs, objp, ~0)) - return FALSE; - return TRUE; + return xdr_string (xdrs, objp, ~0); } +libnsl_hidden_def (xdr_mapname) bool_t xdr_peername (XDR *xdrs, peername *objp) { - if (!xdr_string (xdrs, objp, ~0)) - return FALSE; - return TRUE; + return xdr_string (xdrs, objp, ~0); } +libnsl_hidden_def (xdr_peername) bool_t xdr_keydat (XDR *xdrs, keydat *objp) { - if (!xdr_bytes (xdrs, (char **) &objp->keydat_val, - (u_int *) &objp->keydat_len, ~0)) - return FALSE; - return TRUE; + return xdr_bytes (xdrs, (char **) &objp->keydat_val, + (u_int *) &objp->keydat_len, ~0); } +libnsl_hidden_def (xdr_keydat) bool_t xdr_valdat (XDR *xdrs, valdat *objp) { - if (!xdr_bytes (xdrs, (char **) &objp->valdat_val, - (u_int *) &objp->valdat_len, ~0)) - return FALSE; - return TRUE; + return xdr_bytes (xdrs, (char **) &objp->valdat_val, + (u_int *) &objp->valdat_len, ~0); } +libnsl_hidden_def (xdr_valdat) bool_t xdr_ypmap_parms (XDR *xdrs, ypmap_parms *objp) @@ -97,10 +90,9 @@ xdr_ypmap_parms (XDR *xdrs, ypmap_parms *objp) return FALSE; if (!xdr_u_int (xdrs, &objp->ordernum)) return FALSE; - if (!xdr_peername (xdrs, &objp->peer)) - return FALSE; - return TRUE; + return xdr_peername (xdrs, &objp->peer); } +libnsl_hidden_def (xdr_ypmap_parms) bool_t xdr_ypreq_key (XDR *xdrs, ypreq_key *objp) @@ -109,9 +101,7 @@ xdr_ypreq_key (XDR *xdrs, ypreq_key *objp) return FALSE; if (!xdr_mapname (xdrs, &objp->map)) return FALSE; - if (!xdr_keydat (xdrs, &objp->key)) - return FALSE; - return TRUE; + return xdr_keydat (xdrs, &objp->key); } bool_t @@ -119,9 +109,7 @@ xdr_ypreq_nokey (XDR *xdrs, ypreq_nokey *objp) { if (!xdr_domainname (xdrs, &objp->domain)) return FALSE; - if (!xdr_mapname (xdrs, &objp->map)) - return FALSE; - return TRUE; + return xdr_mapname (xdrs, &objp->map); } bool_t @@ -133,9 +121,7 @@ xdr_ypreq_xfr (XDR *xdrs, ypreq_xfr *objp) return FALSE; if (!xdr_u_int (xdrs, &objp->prog)) return FALSE; - if (!xdr_u_int (xdrs, &objp->port)) - return FALSE; - return TRUE; + return xdr_u_int (xdrs, &objp->port); } bool_t @@ -143,9 +129,7 @@ xdr_ypresp_val (XDR *xdrs, ypresp_val *objp) { if (!xdr_ypstat (xdrs, &objp->stat)) return FALSE; - if (!xdr_valdat (xdrs, &objp->val)) - return FALSE; - return TRUE; + return xdr_valdat (xdrs, &objp->val); } bool_t @@ -155,19 +139,16 @@ xdr_ypresp_key_val (XDR *xdrs, ypresp_key_val *objp) return FALSE; if (!xdr_valdat (xdrs, &objp->val)) return FALSE; - if (!xdr_keydat (xdrs, &objp->key)) - return FALSE; - return TRUE; + return xdr_keydat (xdrs, &objp->key); } +libnsl_hidden_def (xdr_ypresp_key_val) bool_t xdr_ypresp_master (XDR *xdrs, ypresp_master *objp) { if (!xdr_ypstat (xdrs, &objp->stat)) return FALSE; - if (!xdr_peername (xdrs, &objp->peer)) - return FALSE; - return TRUE; + return xdr_peername (xdrs, &objp->peer); } bool_t @@ -175,9 +156,7 @@ xdr_ypresp_order (XDR *xdrs, ypresp_order *objp) { if (!xdr_ypstat (xdrs, &objp->stat)) return FALSE; - if (!xdr_u_int (xdrs, &objp->ordernum)) - return FALSE; - return TRUE; + return xdr_u_int (xdrs, &objp->ordernum); } bool_t @@ -188,9 +167,7 @@ xdr_ypresp_all (XDR *xdrs, ypresp_all *objp) switch (objp->more) { case TRUE: - if (!xdr_ypresp_key_val (xdrs, &objp->ypresp_all_u.val)) - return FALSE; - break; + return xdr_ypresp_key_val (xdrs, &objp->ypresp_all_u.val); case FALSE: break; default: @@ -198,15 +175,14 @@ xdr_ypresp_all (XDR *xdrs, ypresp_all *objp) } return TRUE; } +libnsl_hidden_def (xdr_ypresp_all) bool_t xdr_ypresp_xfr (XDR *xdrs, ypresp_xfr *objp) { if (!xdr_u_int (xdrs, &objp->transid)) return FALSE; - if (!xdr_ypxfrstat (xdrs, &objp->xfrstat)) - return FALSE; - return TRUE; + return xdr_ypxfrstat (xdrs, &objp->xfrstat); } bool_t @@ -214,10 +190,8 @@ xdr_ypmaplist (XDR *xdrs, ypmaplist *objp) { if (!xdr_mapname (xdrs, &objp->map)) return FALSE; - if (!xdr_pointer (xdrs, (char **) &objp->next, sizeof (ypmaplist), - (xdrproc_t) xdr_ypmaplist)) - return FALSE; - return TRUE; + return xdr_pointer (xdrs, (char **) &objp->next, sizeof (ypmaplist), + (xdrproc_t) xdr_ypmaplist); } bool_t @@ -225,47 +199,40 @@ xdr_ypresp_maplist (XDR *xdrs, ypresp_maplist *objp) { if (!xdr_ypstat (xdrs, &objp->stat)) return FALSE; - if (!xdr_pointer (xdrs, (char **) &objp->maps, sizeof (ypmaplist), - (xdrproc_t) xdr_ypmaplist)) - return FALSE; - return TRUE; + return xdr_pointer (xdrs, (char **) &objp->maps, sizeof (ypmaplist), + (xdrproc_t) xdr_ypmaplist); } bool_t xdr_yppush_status (XDR *xdrs, yppush_status *objp) { - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; + return xdr_enum (xdrs, (enum_t *) objp); } +libnsl_hidden_def (xdr_yppush_status) bool_t xdr_yppushresp_xfr (XDR *xdrs, yppushresp_xfr *objp) { if (!xdr_u_int (xdrs, &objp->transid)) return FALSE; - if (!xdr_yppush_status (xdrs, &objp->status)) - return FALSE; - return TRUE; + return xdr_yppush_status (xdrs, &objp->status); } bool_t xdr_ypbind_resptype (XDR *xdrs, ypbind_resptype *objp) { - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; + return xdr_enum (xdrs, (enum_t *) objp); } +libnsl_hidden_def (xdr_ypbind_resptype) bool_t xdr_ypbind_binding (XDR *xdrs, ypbind_binding *objp) { if (!xdr_opaque (xdrs, objp->ypbind_binding_addr, 4)) return FALSE; - if (!xdr_opaque (xdrs, objp->ypbind_binding_port, 2)) - return FALSE; - return TRUE; + return xdr_opaque (xdrs, objp->ypbind_binding_port, 2); } +libnsl_hidden_def (xdr_ypbind_binding) bool_t xdr_ypbind_resp (XDR *xdrs, ypbind_resp *objp) @@ -275,17 +242,11 @@ xdr_ypbind_resp (XDR *xdrs, ypbind_resp *objp) switch (objp->ypbind_status) { case YPBIND_FAIL_VAL: - if (!xdr_u_int (xdrs, &objp->ypbind_resp_u.ypbind_error)) - return FALSE; - break; + return xdr_u_int (xdrs, &objp->ypbind_resp_u.ypbind_error); case YPBIND_SUCC_VAL: - if (!xdr_ypbind_binding (xdrs, &objp->ypbind_resp_u.ypbind_bindinfo)) - return FALSE; - break; - default: - return FALSE; + return xdr_ypbind_binding (xdrs, &objp->ypbind_resp_u.ypbind_bindinfo); } - return TRUE; + return FALSE; } bool_t @@ -295,9 +256,7 @@ xdr_ypbind_setdom (XDR *xdrs, ypbind_setdom *objp) return FALSE; if (!xdr_ypbind_binding (xdrs, &objp->ypsetdom_binding)) return FALSE; - if (!xdr_u_int (xdrs, &objp->ypsetdom_vers)) - return FALSE; - return TRUE; + return xdr_u_int (xdrs, &objp->ypsetdom_vers); } bool_t |