Constify

parent 6593b997
......@@ -58,7 +58,7 @@
* node finalizers
*/
static void fini_final(struct vdp_ctx *, struct node *);
static void fini_subreq(struct vdp_ctx *, struct node *);
static void fini_subreq(const struct vdp_ctx *, struct node *);
static void fini_data(struct vdp_ctx *, struct node *);
/* ============================================================
......@@ -363,7 +363,7 @@ node_insert(struct bytes_tree *tree, struct node *parent,
}
static void
set_unpending(struct bytes_tree *tree, struct node *node)
set_unpending(const struct bytes_tree *tree, struct node *node)
{
struct node *parent;
......@@ -606,7 +606,7 @@ fini_final(struct vdp_ctx *vdx, struct node *node)
}
static void
fini_subreq(struct vdp_ctx *vdx, struct node *node)
fini_subreq(const struct vdp_ctx *vdx, struct node *node)
{
struct req *subreq;
struct boc *boc = NULL;
......@@ -737,7 +737,7 @@ static const uint8_t gzip_hdr[] = {
};
static void
gzip_tailbuf(uint8_t tailbuf[GZIP_TAILBUF_SZ], struct nexus_gzip *gz)
gzip_tailbuf(uint8_t tailbuf[GZIP_TAILBUF_SZ], const struct nexus_gzip *gz)
{
AN(gz->is);
AZ(gz->up);
......@@ -757,7 +757,7 @@ gzip_tailbuf(uint8_t tailbuf[GZIP_TAILBUF_SZ], struct nexus_gzip *gz)
static int
push_crc(struct vdp_ctx *vdx, struct bytes_tree *tree,
struct node *node, const struct node *next)
const struct node *node, const struct node *next)
{
struct node *nex;
struct nexus_gzip *parent_gzip;
......@@ -809,7 +809,7 @@ push_crc(struct vdp_ctx *vdx, struct bytes_tree *tree,
static int
push_data(struct vdp_ctx *vdx, struct bytes_tree *tree,
struct node *node, const struct node *next)
const struct node *node, const struct node *next)
{
const void *p;
enum vdp_action act;
......@@ -847,7 +847,7 @@ push_data(struct vdp_ctx *vdx, struct bytes_tree *tree,
*/
static int
worklist_push(struct vdp_ctx *vdx, struct bytes_tree *tree,
struct node_head *work)
const struct node_head *work)
{
struct node *node, *next, *parent;
int retval = 0;
......@@ -922,7 +922,7 @@ worklist_push(struct vdp_ctx *vdx, struct bytes_tree *tree,
static void
worklist_set_delivered(struct vdp_ctx *vdx, struct bytes_tree *tree,
struct node_head *work)
const struct node_head *work)
{
struct node *node, *parent, *tmp;
......@@ -961,7 +961,7 @@ worklist_set_delivered(struct vdp_ctx *vdx, struct bytes_tree *tree,
} while(0)
static void
worklist_unpend(struct vdp_ctx *vdx, struct bytes_tree *tree,
worklist_unpend(const struct vdp_ctx *vdx, struct bytes_tree *tree,
struct node_head *work)
{
struct node *node, *next;
......
......@@ -217,7 +217,7 @@ struct node {
*/
static inline void
node_mutate_prep(struct bytes_tree *tree, struct node *node)
node_mutate_prep(const struct bytes_tree *tree, struct node *node)
{
CHECK_OBJ_NOTNULL(node, NODE_MAGIC);
CHECK_OBJ_NOTNULL(node->parent, NODE_MAGIC);
......
......@@ -48,10 +48,10 @@ enum check_state {
#define assert_node(n, c) (void)0
#define assert_nexus(n, c) (void)0
#else
static inline void assert_node(struct node *node, enum check_state check);
static inline void assert_node(const struct node *node, enum check_state check);
static inline void
assert_nexus(struct node *node, enum check_state nexcheck)
assert_nexus(const struct node *node, enum check_state nexcheck)
{
struct node *child;
enum check_state check;
......@@ -78,7 +78,7 @@ assert_nexus(struct node *node, enum check_state nexcheck)
}
static inline void
assert_node(struct node *node, enum check_state check)
assert_node(const struct node *node, enum check_state check)
{
CHECK_OBJ_NOTNULL(node, NODE_MAGIC);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment