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) {
|
static struct capn_segment *lookup_segment(struct capn* c, struct capn_segment *s, uint32_t id) {
|
||||||
struct capn_tree **x;
|
struct capn_tree **x = &c->segtree;
|
||||||
struct capn_segment *y;
|
struct capn_segment *y = NULL;
|
||||||
|
|
||||||
if (s && s->id == id)
|
if (s && s->id == id)
|
||||||
return s;
|
return s;
|
||||||
|
|
@ -195,8 +195,6 @@ static struct capn_segment *lookup_segment(struct capn* c, struct capn_segment *
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (id < c->segnum) {
|
if (id < c->segnum) {
|
||||||
x = &c->segtree;
|
|
||||||
y = NULL;
|
|
||||||
while (*x) {
|
while (*x) {
|
||||||
y = (struct capn_segment*) *x;
|
y = (struct capn_segment*) *x;
|
||||||
if (id == y->id) {
|
if (id == y->id) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue