From 74a635b1ecf5efa437b5c8dc194a45528ce959ce Mon Sep 17 00:00:00 2001 From: Dawid Gajownik Date: Thu, 6 Aug 2015 17:12:19 -0300 Subject: Coding style fixes - opening braces are on the same line as the if statement - opening braces are not on the same line as the function name - space between for/while/if and opening parenthesis Signed-off-by: Dawid Gajownik Reviewed-by: Derek Foreman --- tests/internal-screenshot-test.c | 12 ++++++++---- tests/keyboard-test.c | 2 +- tests/weston-test-client-helper.c | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/internal-screenshot-test.c b/tests/internal-screenshot-test.c index 6038e1d0..e72a6958 100644 --- a/tests/internal-screenshot-test.c +++ b/tests/internal-screenshot-test.c @@ -42,7 +42,8 @@ char *server_parameters="--use-pixman --width=320 --height=240"; * @returns true if successfully saved file; false otherwise. */ static bool -write_surface_as_png(const struct surface* weston_surface, const char *fname) { +write_surface_as_png(const struct surface* weston_surface, const char *fname) +{ cairo_surface_t *cairo_surface; cairo_status_t status; int bpp = 4; /* Assume ARGB */ @@ -73,7 +74,8 @@ write_surface_as_png(const struct surface* weston_surface, const char *fname) { * when no longer used; or, NULL in case of error. */ static struct surface* -load_surface_from_png(const char *fname) { +load_surface_from_png(const char *fname) +{ struct surface *reference; cairo_surface_t *reference_cairo_surface; cairo_status_t status; @@ -138,7 +140,8 @@ load_surface_from_png(const char *fname) { * free'd when done using it. */ static struct surface* -create_screenshot_surface(struct client *client) { +create_screenshot_surface(struct client *client) +{ struct surface* screenshot; screenshot = xzalloc(sizeof *screenshot); if (screenshot == NULL) @@ -163,7 +166,8 @@ create_screenshot_surface(struct client *client) { * longer needed. */ static struct surface * -capture_screenshot_of_output(struct client *client) { +capture_screenshot_of_output(struct client *client) +{ struct surface *screenshot; /* Create a surface to hold the screenshot */ diff --git a/tests/keyboard-test.c b/tests/keyboard-test.c index 7acc327b..9cf69ec6 100644 --- a/tests/keyboard-test.c +++ b/tests/keyboard-test.c @@ -40,7 +40,7 @@ TEST(simple_keyboard_test) keyboard = client->input->keyboard; - while(1) { + while (1) { assert(keyboard->key == expect_key); assert(keyboard->state == expect_state); assert(keyboard->focus == expect_focus); diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c index 130d2b45..65a8880b 100644 --- a/tests/weston-test-client-helper.c +++ b/tests/weston-test-client-helper.c @@ -525,7 +525,7 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, /* we will create/update the devices only with the right (test) seat. * If we haven't discovered which seat is the test seat, just * store capabilities and bail out */ - if(input->seat_name && strcmp(input->seat_name, "test-seat") == 0) + if (input->seat_name && strcmp(input->seat_name, "test-seat") == 0) input_update_devices(input); fprintf(stderr, "test-client: got seat %p capabilities: %x\n", -- cgit v1.2.1