]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/nfs/xdr_subs.h
xnu-6153.141.1.tar.gz
[apple/xnu.git] / bsd / nfs / xdr_subs.h
index 24295f4875ddd28eb64549cbe528b150115e664c..36e4dc9292b941eae07c473ab6f67d508456aa10 100644 (file)
  *
  * 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;