diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-08 12:49:48 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-04-08 12:49:48 -0400 |
commit | 7bb8512afb14e7642ab44850d313df850881ea86 (patch) | |
tree | 42f161e55f078f5c55134cafc2a1704be37d8ee5 /rootston | |
parent | cedd151e1781955878c30d6b515ff574f2531d52 (diff) |
Fix assertions with side-effects
Fixes #1725
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rootston/main.c b/rootston/main.c index d85701ca..4f623d49 100644 --- a/rootston/main.c +++ b/rootston/main.c @@ -28,9 +28,10 @@ static void ready(struct wl_listener *listener, void *data) { int main(int argc, char **argv) { wlr_log_init(L_DEBUG, NULL); - assert(server.config = roots_config_create_from_args(argc, argv)); - assert(server.wl_display = wl_display_create()); - assert(server.wl_event_loop = wl_display_get_event_loop(server.wl_display)); + server.config = roots_config_create_from_args(argc, argv); + server.wl_display = wl_display_create(); + server.wl_event_loop = wl_display_get_event_loop(server.wl_display) + assert(server.config && server.wl_display && server.wl_event_loop); server.backend = wlr_backend_autocreate(server.wl_display); if (server.backend == NULL) { @@ -38,7 +39,8 @@ int main(int argc, char **argv) { return 1; } - assert(server.renderer = wlr_backend_get_renderer(server.backend)); + server.renderer = wlr_backend_get_renderer(server.backend); + assert(server.renderer); server.data_device_manager = wlr_data_device_manager_create(server.wl_display); wl_display_init_shm(server.wl_display); |