chiark / gitweb /
cleanup: provide helpful FILLZERO macro (for certain memset calls)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 13 Jul 2011 22:59:17 +0000 (23:59 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 17 Aug 2011 22:03:28 +0000 (23:03 +0100)
commit076bb54e68477f883033bee696c9c5f801ece2f2
treedc982df58f674835ef91ec036f7ab13b06d2cdc2
parent45cfab8ca7db61ce4677e2e77e76b9266c57ab12
cleanup: provide helpful FILLZERO macro (for certain memset calls)

This macro replaces these idioms:
  memset(&foo,0,sizeof(foo));   =>   FILLZERO(foo);
  memset(foo,0,sizeof(*foo));   =>   FILLZERO(*foo);

This makes it impossible to accidentally get the wrong size.

Use this macro in all such patterns in secnet, apart from two in
site.c which are going to be removed soon anyway.

No intentional functional change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
secnet.h
transform.c
tun.c
udp.c