aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwil <william.barsse@gmail.com>2017-01-08 14:16:40 +0100
committerwil <william.barsse@gmail.com>2017-01-08 14:16:40 +0100
commitd822150d8389a293d6df1ce177ee713ef3113d3f (patch)
treec344b872adf00178f27179651b9332dd043dafb2
parent2040c62da94106fbd2a0e7fc5f73bcd181aea05c (diff)
downloadsway-d822150d8389a293d6df1ce177ee713ef3113d3f.zip
sway-d822150d8389a293d6df1ce177ee713ef3113d3f.tar.gz
sway-d822150d8389a293d6df1ce177ee713ef3113d3f.tar.bz2
[fix] Keep Clang happy
-rw-r--r--sway/layout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sway/layout.c b/sway/layout.c
index e2f3184..3e46716 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -1504,7 +1504,9 @@ bool is_auto_layout(enum swayc_layouts layout) {
* Return the number of master elements in a container
*/
static inline size_t auto_master_count(const swayc_t *container) {
- return MIN(container->nb_master, container->children->length);
+ sway_assert(container->children->length >= 0, "Container %p has (negative) children %d",
+ container, container->children->length);
+ return MIN(container->nb_master, (size_t)container->children->length);
}
/**