[LTP] [PATCH v1] Rewrite process_vm_readv03.c test with new LTP API

Jan Stancek jstancek@redhat.com
Thu Jan 27 10:38:22 CET 2022


On Wed, Jan 26, 2022 at 3:05 PM Andrea Cervesato
<andrea.cervesato@suse.de> wrote:
<snip>

>
> -static void child_alloc(int *bufsz_arr)
> +static void child_alloc(const int *sizes, int nr_iovecs)
>  {
>         char **foo;
>         int i, j;
> -       char buf[BUFSIZ];
>         long count;
>
> -       foo = SAFE_MALLOC(tst_exit, nr_iovecs * sizeof(char *));
> +       foo = SAFE_MALLOC(nr_iovecs * sizeof(int *));

Overall conversion looks good to me, but why this change from "char *"
to "int *"
when foo is char **?



More information about the ltp mailing list