*
* 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 {
xb_free(xbp->xb_u.xb_buffer.xbb_base);
}
break;
+ default:
+ break;
}
xbp->xb_flags &= ~XB_CLEANUP;
}
case XDRBUF_BUFFER:
xbp->xb_u.xb_buffer.xbb_len = xbp->xb_ptr - xbp->xb_u.xb_buffer.xbb_base;
break;
+ default:
+ break;
}
}
case XDRBUF_BUFFER:
offset = xbp->xb_ptr - xbp->xb_u.xb_buffer.xbb_base;
break;
+ default:
+ break;
}
return 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;
xbp->xb_ptr = newbuf + oldsize;
xbp->xb_left = xbp->xb_growsize;
break;
+ default:
+ break;
}
return 0;