From 823a820e87ad10c2efd666fa2be795016fcb673b Mon Sep 17 00:00:00 2001 From: Steven Dee Date: Wed, 26 Feb 2014 01:24:50 +0000 Subject: [PATCH] Initialize x and y unconditionally Fixes a compiler warning. --- capn.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/capn.c b/capn.c index a41adb1..256755a 100644 --- a/capn.c +++ b/capn.c @@ -186,8 +186,8 @@ end: } static struct capn_segment *lookup_segment(struct capn* c, struct capn_segment *s, uint32_t id) { - struct capn_tree **x; - struct capn_segment *y; + struct capn_tree **x = &c->segtree; + struct capn_segment *y = NULL; if (s && s->id == id) return s; @@ -195,8 +195,6 @@ static struct capn_segment *lookup_segment(struct capn* c, struct capn_segment * return NULL; if (id < c->segnum) { - x = &c->segtree; - y = NULL; while (*x) { y = (struct capn_segment*) *x; if (id == y->id) {