X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/0a7de7458d150b5d4dffc935ba399be265ef0a1a..eb6b6ca394357805f2bdba989abae309f718b4d8:/bsd/nfs/xdr_subs.h diff --git a/bsd/nfs/xdr_subs.h b/bsd/nfs/xdr_subs.h index 24295f487..36e4dc929 100644 --- a/bsd/nfs/xdr_subs.h +++ b/bsd/nfs/xdr_subs.h @@ -100,7 +100,10 @@ * * generalized functionality for managing the building/dissecting of XDR data */ -typedef enum xdrbuf_type { XDRBUF_BUFFER=1 } xdrbuf_type; +typedef enum xdrbuf_type { + XDRBUF_NONE = 0, + XDRBUF_BUFFER = 1, +} xdrbuf_type; struct xdrbuf { union { @@ -192,6 +195,8 @@ xb_cleanup(struct xdrbuf *xbp) xb_free(xbp->xb_u.xb_buffer.xbb_base); } break; + default: + break; } xbp->xb_flags &= ~XB_CLEANUP; } @@ -207,6 +212,8 @@ xb_set_cur_buf_len(struct xdrbuf *xbp) case XDRBUF_BUFFER: xbp->xb_u.xb_buffer.xbb_len = xbp->xb_ptr - xbp->xb_u.xb_buffer.xbb_base; break; + default: + break; } } @@ -244,6 +251,8 @@ xb_offset(struct xdrbuf *xbp) case XDRBUF_BUFFER: offset = xbp->xb_ptr - xbp->xb_u.xb_buffer.xbb_base; break; + default: + break; } return offset; @@ -260,6 +269,8 @@ xb_seek(struct xdrbuf *xbp, uint32_t offset) xbp->xb_ptr = xbp->xb_u.xb_buffer.xbb_base + offset; xbp->xb_left = xbp->xb_u.xb_buffer.xbb_len - offset; break; + default: + break; } return 0; @@ -323,6 +334,8 @@ xb_grow(struct xdrbuf *xbp) xbp->xb_ptr = newbuf + oldsize; xbp->xb_left = xbp->xb_growsize; break; + default: + break; } return 0;