diff options
author | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2016-11-23 09:54:27 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-11-25 11:35:53 +1000 |
commit | 2de37eb71b928f6f50c109536c2f7b77293ad8e3 (patch) | |
tree | 8da06be2a1ff5352da3829881bd780bc73d13c94 | |
parent | cf8860786c3e301486cd2853bc82977ba75e6b17 (diff) |
xwayland: fix order of calloc() args
The definition by the manual is:
calloc(size_t nmemb, size_t size)
Swap the arguments of calloc() calls to be the right way around.
Presumably this makes no functional difference, but better follow the
spec.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | hw/xwayland/xwayland-input.c | 6 | ||||
-rw-r--r-- | hw/xwayland/xwayland-output.c | 2 | ||||
-rw-r--r-- | hw/xwayland/xwayland.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 0526122c2..cc0396125 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -847,7 +847,7 @@ touch_handle_down(void *data, struct wl_touch *wl_touch, if (surface == NULL) return; - xwl_touch = calloc(sizeof *xwl_touch, 1); + xwl_touch = calloc(1, sizeof *xwl_touch); if (xwl_touch == NULL) { ErrorF("touch_handle_down ENOMEM"); return; @@ -1118,7 +1118,7 @@ create_input_device(struct xwl_screen *xwl_screen, uint32_t id, uint32_t version { struct xwl_seat *xwl_seat; - xwl_seat = calloc(sizeof *xwl_seat, 1); + xwl_seat = calloc(1, sizeof *xwl_seat); if (xwl_seat == NULL) { ErrorF("create_input ENOMEM\n"); return; @@ -1445,7 +1445,7 @@ xwl_pointer_warp_emulator_create(struct xwl_seat *xwl_seat) { struct xwl_pointer_warp_emulator *warp_emulator; - warp_emulator = calloc(sizeof *warp_emulator, 1); + warp_emulator = calloc(1, sizeof *warp_emulator); if (!warp_emulator) { ErrorF("%s: ENOMEM", __func__); return NULL; diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index ef3b6f67c..f3ce7639e 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -242,7 +242,7 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id) static int serial; char name[256]; - xwl_output = calloc(sizeof *xwl_output, 1); + xwl_output = calloc(1, sizeof *xwl_output); if (xwl_output == NULL) { ErrorF("create_output ENOMEM\n"); return NULL; diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index c27787018..9e1ecf8f5 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -319,7 +319,7 @@ xwl_realize_window(WindowPtr window) return ret; } - xwl_window = calloc(sizeof *xwl_window, 1); + xwl_window = calloc(1, sizeof *xwl_window); if (xwl_window == NULL) return FALSE; @@ -688,7 +688,7 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv) Pixel red_mask, blue_mask, green_mask; int ret, bpc, green_bpc, i; - xwl_screen = calloc(sizeof *xwl_screen, 1); + xwl_screen = calloc(1, sizeof *xwl_screen); if (xwl_screen == NULL) return FALSE; xwl_screen->wm_fd = -1; |