Reacted on compiler warnings of Debian 13 Sid about calloc argument swap

This commit is contained in:
2025-09-14 10:53:35 +02:00
parent bb0b7f62e5
commit 879bcc8acd
4 changed files with 16 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
/* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images.
Copyright 2007-2020 Thomas Schmitt, <scdbackup@gmx.net>
Copyright 2007-2025 Thomas Schmitt, <scdbackup@gmx.net>
Provided under GPL version 2 or later.
@@ -60,12 +60,12 @@ int Xorriso_extf_new(struct XorrisO *xorriso, struct Xorriso_extF **filter,
struct Xorriso_extF *o= NULL;
IsoExternalFilterCommand *cmd;
*filter= o= calloc(sizeof(struct Xorriso_extF), 1);
*filter= o= calloc(1, sizeof(struct Xorriso_extF));
if(o == NULL)
goto failure;
o->flag= flag;
o->cmd= NULL;
o->cmd= cmd= calloc(sizeof(IsoExternalFilterCommand), 1);
o->cmd= cmd= calloc(1, sizeof(IsoExternalFilterCommand));
if(cmd == NULL)
goto failure;
cmd->version= 0;
@@ -83,7 +83,7 @@ int Xorriso_extf_new(struct XorrisO *xorriso, struct Xorriso_extF **filter,
cmd->path= strdup(path);
if(cmd->path == NULL)
goto failure;
cmd->argv= calloc(sizeof(char *), argc + 2);
cmd->argv= calloc(argc + 2, sizeof(char *));
if(cmd->argv == NULL)
goto failure;
for(i= 0; i < argc + 2; i++)