mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-20 00:14:06 +03:00
frontends: monkey: Squash -Wcalloc-transposed-args (gcc-14)
This commit is contained in:
parent
ff87de87f3
commit
506f4b14bb
@ -56,7 +56,7 @@ gui_401login_open(struct nsurl *url,
|
||||
{
|
||||
struct monkey401 *m401_ctx;
|
||||
|
||||
m401_ctx = calloc(sizeof(*m401_ctx), 1);
|
||||
m401_ctx = calloc(1, sizeof(*m401_ctx));
|
||||
if (m401_ctx == NULL) {
|
||||
return NSERROR_NOMEM;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ struct bitmap {
|
||||
|
||||
static void *bitmap_create(int width, int height, enum gui_bitmap_flags flags)
|
||||
{
|
||||
struct bitmap *ret = calloc(sizeof(*ret), 1);
|
||||
struct bitmap *ret = calloc(1, sizeof(*ret));
|
||||
if (ret == NULL)
|
||||
return NULL;
|
||||
|
||||
|
@ -75,7 +75,7 @@ gui_window_create(struct browser_window *bw,
|
||||
struct gui_window *existing,
|
||||
gui_window_create_flags flags)
|
||||
{
|
||||
struct gui_window *ret = calloc(sizeof(*ret), 1);
|
||||
struct gui_window *ret = calloc(1, sizeof(*ret));
|
||||
if (ret == NULL)
|
||||
return NULL;
|
||||
|
||||
|
@ -38,7 +38,7 @@ static monkey_cmdhandler_t *handler_ring = NULL;
|
||||
nserror
|
||||
monkey_register_handler(const char *cmd, handle_command_fn fn)
|
||||
{
|
||||
monkey_cmdhandler_t *ret = calloc(sizeof(*ret), 1);
|
||||
monkey_cmdhandler_t *ret = calloc(1, sizeof(*ret));
|
||||
if (ret == NULL) {
|
||||
NSLOG(netsurf, INFO, "Unable to allocate handler");
|
||||
return NSERROR_NOMEM;
|
||||
|
@ -45,7 +45,7 @@ static struct gui_download_window *
|
||||
gui_download_window_create(download_context *ctx,
|
||||
struct gui_window *parent)
|
||||
{
|
||||
struct gui_download_window *ret = calloc(sizeof(*ret), 1);
|
||||
struct gui_download_window *ret = calloc(1, sizeof(*ret));
|
||||
if (ret == NULL)
|
||||
return NULL;
|
||||
ret->g = parent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user