diff options
author | Guido Cella <guidocella91@gmail.com> | 2020-09-05 14:14:19 +0200 |
---|---|---|
committer | Guido Cella <guidocella91@gmail.com> | 2020-09-05 14:15:03 +0200 |
commit | 9743778d09b44e346f9a764499f1caa0dc0cf5c5 (patch) | |
tree | 455dfcd4b8488f3bff602dd28258f7b46a92c4b6 | |
parent | 6b25e7ef27392bf8f0617bb62918ec6a7198bce7 (diff) |
rename variable and merge 2 lines
-rw-r--r-- | dwl.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -769,7 +769,7 @@ createmon(struct wl_listener *listener, void *data) struct wlr_output *wlr_output = data; Monitor *m; const MonitorRule *r; - size_t len; + size_t nlayers = LENGTH(m->layers); /* The mode is a tuple of (width, height, refresh rate), and each * monitor supports only a specific set of modes. We just pick the @@ -820,8 +820,7 @@ createmon(struct wl_listener *listener, void *data) m->m = *wlr_output_layout_get_box(output_layout, m->wlr_output); m->w = m->m; - len = LENGTH(m->layers); - for (unsigned int i = 0; i < len; ++i) { + for (unsigned int i = 0; i < nlayers; ++i) { wl_list_init(&m->layers[i]); } } |