]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
Use C99 initializer instead of memset.
authorTom Carroll <incentivedesign@gmail.com>
Mon, 17 May 2021 05:58:24 +0000 (22:58 -0700)
committerDavid Woodhouse <dwmw2@infradead.org>
Wed, 19 May 2021 09:46:27 +0000 (10:46 +0100)
commit0cfdb7b871fd04c7a500001d2d0961779adf0ed5
tree720d9d3ada6c27c5fe41c467a20cd6a7fc3a26e0
parent63c984b897f009c07a73c3aaf11a24ecf9876411
Use C99 initializer instead of memset.

Strictly speaking, using memset() here violates strict aliasing rules,
and it would be entirely permissible for an assert() like this example
to *fail*:

struct gtls_cert_info gci;

memset(&gci, 0, sizeof gci);
assert(gci.pkey == NULL);

Signed-off-by: Tom Carroll <incentivedesign@gmail.com>
gnutls.c