summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Gschwind <gschwind@gnu-log.net>2016-05-10 22:47:44 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-05-11 12:24:57 +0300
commit676841d617d9ec2165d703db59b8722f997456c9 (patch)
tree15276dbeea189d5e6f533e13aef0d50f4ee2f6d3 /src
parent1c0e40d9a272c99c3f45ce2e15f8214165770912 (diff)
downloadweston-676841d617d9ec2165d703db59b8722f997456c9.tar.gz
compositor-wayland: fix spacing and lines wraping
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> [Pekka: squashed with "compositor-wayland: fix too long lines".] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'src')
-rw-r--r--src/compositor-wayland.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index d0d10823..4799f904 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -2326,8 +2326,10 @@ wayland_backend_destroy(struct wayland_backend *b)
}
static void
-wayland_backend_config_release(struct weston_wayland_backend_config *new_config) {
+wayland_backend_config_release(struct weston_wayland_backend_config *new_config)
+{
int i;
+
for (i = 0; i < new_config->num_outputs; ++i) {
free(new_config->outputs[i].name);
}
@@ -2342,21 +2344,24 @@ wayland_backend_config_release(struct weston_wayland_backend_config *new_config)
* structure is NOT cleared nor set to default values.
*/
static struct weston_wayland_backend_output_config *
-wayland_backend_config_add_new_output(struct weston_wayland_backend_config *new_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;
new_config->outputs = outputs;
- return &(new_config->outputs[new_config->num_outputs-1]);
+ return &(new_config->outputs[new_config->num_outputs - 1]);
}
static int
-load_wayland_backend_config(struct weston_compositor *compositor, int *argc, char *argv[],
- struct weston_config *config,
- struct weston_wayland_backend_config *out_config)
+load_wayland_backend_config(struct weston_compositor *compositor, int *argc,
+ char *argv[], struct weston_config *config,
+ struct weston_wayland_backend_config *out_config)
{
struct weston_wayland_backend_config new_config = { 0, };
struct weston_config_section *section;