Initialize x and y unconditionally
Fixes a compiler warning.
This commit is contained in:
parent
89f1ac3953
commit
823a820e87
1 changed files with 2 additions and 4 deletions
6
capn.c
6
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue