jail: use portable sizeof(void *)
authorDaniel Golle <daniel@makrotopia.org>
Mon, 23 Aug 2021 16:49:31 +0000 (17:49 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 24 Aug 2021 17:31:41 +0000 (18:31 +0100)
Coverity CID: 1490010 Sizeof not portable

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
jail/jail.c

index 43a694aa1249bf6afad57372b1a05bd01192de1a..c02095b4a00ae0b0b3ff976f271266b981cb6d50 100644 (file)
@@ -2723,7 +2723,7 @@ int main(int argc, char **argv)
        /* deliberately not using 'else' on unrelated conditional branches */
        if (!opts.ocibundle) {
                /* allocate NULL-terminated array for argv */
-               opts.jail_argv = calloc(1 + argc - optind, sizeof(char**));
+               opts.jail_argv = calloc(1 + argc - optind, sizeof(void *));
                if (!opts.jail_argv) {
                        ret=EXIT_FAILURE;
                        goto errout;