diff --git a/layout.c b/layout.c index 5e48610f9..41fd09196 100644 --- a/layout.c +++ b/layout.c @@ -62,11 +62,9 @@ layout_create_cell(struct layout_cell *lcparent) { struct layout_cell *lc; - lc = xmalloc(sizeof *lc); + lc = xcalloc(1, sizeof *lc); lc->type = LAYOUT_WINDOWPANE; - lc->flags = 0; lc->parent = lcparent; - TAILQ_INIT(&lc->cells); lc->sx = UINT_MAX; @@ -81,8 +79,6 @@ layout_create_cell(struct layout_cell *lcparent) lc->saved_xoff = INT_MAX; lc->saved_yoff = INT_MAX; - lc->wp = NULL; - return (lc); } diff --git a/options.c b/options.c index fd5f1b262..3b81ed57d 100644 --- a/options.c +++ b/options.c @@ -667,7 +667,7 @@ options_array_first(struct options_entry *o) struct options_array_item * options_array_next(struct options_array_item *a) { - return (RB_NEXT(options_array, &o->value.array, a)); + return (RB_NEXT(options_array, , a)); } const char *