[PATCH weston v4 02/14] compositor-wayland: fix too long lines

Benoit Gschwind gschwind at gnu-log.net
Tue May 10 20:47:45 UTC 2016


Signed-off-by: Benoit Gschwind <gschwind at gnu-log.net>
---
 src/compositor-wayland.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index 9351687..4799f90 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -2347,9 +2347,10 @@ static struct weston_wayland_backend_output_config *
 wayland_backend_config_add_new_output(struct weston_wayland_backend_config *new_config)
 {
 	struct weston_wayland_backend_output_config *outputs;
+	const size_t element_size = sizeof(struct weston_wayland_backend_output_config);
 
 	outputs = realloc(new_config->outputs,
-			  (new_config->num_outputs + 1) * sizeof(struct weston_wayland_backend_output_config));
+			  (new_config->num_outputs + 1) * element_size);
 	if (!outputs)
 		return NULL;
 	new_config->num_outputs += 1;
-- 
2.7.3



More information about the wayland-devel mailing list