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>
This commit is contained in:
parent
cf8860786c
commit
2de37eb71b
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue