Re: [PATCH v3 2/2] selftests: Add a test mangling with uc_sigmask
From: Oleg Nesterov
Date: Wed Jun 26 2024 - 07:56:28 EST
On 06/26, Dev Jain wrote:
>
> +int main(int argc, char *argv[])
> +{
> + struct sigaction act, act2;
> + sigset_t *set, *oldset;
...
> + set = malloc(sizeof(sigset_t *));
> + if (!set)
> + ksft_exit_fail_perror("malloc");
> +
> + oldset = malloc(sizeof(sigset_t *));
Why malloc() ?
Can't you simply do
sigset_t set, oldset;
and then use sigemptyset(&set) / etc ?
Oleg.