Re: [PATCH 06/17] setterm: add option control structure

Karel Zak
2014-05-19T09:48:23Z

On Sun, May 18, 2014 at 03:05:30PM +0100, Sami Kerola wrote:
> +int main(int argc, char **argv)
> +{
> + struct setterm_control ctl;
> + int term_errno;
>
> + memset(&ctl, 0, sizeof (ctl));

The memset() call is unnecessary. It's enough to set any struct member
to zeroize whole struct, etc:

struct setterm_control ctl = { .opt_te_terminal_name = NULL };

--
Karel Zak <kzak@redhat.com>