summaryrefslogtreecommitdiffstats
path: root/usr.sbin/npppd/l2tp
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-05-07 01:20:53 +0000
committertedu <tedu@openbsd.org>2014-05-07 01:20:53 +0000
commit9e298f67c05bb388258183fc56d860fcd0dac3f0 (patch)
treecb04e9372e731f93d1b5509086717d5a7fd09afd /usr.sbin/npppd/l2tp
parentuse calloc. from Peter Malone (diff)
downloadwireguard-openbsd-9e298f67c05bb388258183fc56d860fcd0dac3f0.tar.xz
wireguard-openbsd-9e298f67c05bb388258183fc56d860fcd0dac3f0.zip
calloc is simpler. suggested by Peter Malone and halex
Diffstat (limited to 'usr.sbin/npppd/l2tp')
-rw-r--r--usr.sbin/npppd/l2tp/l2tp_ctrl.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.sbin/npppd/l2tp/l2tp_ctrl.c b/usr.sbin/npppd/l2tp/l2tp_ctrl.c
index ffc88a6c884..012e889a938 100644
--- a/usr.sbin/npppd/l2tp/l2tp_ctrl.c
+++ b/usr.sbin/npppd/l2tp/l2tp_ctrl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: l2tp_ctrl.c,v 1.16 2013/09/13 03:25:27 yasuoka Exp $ */
+/* $OpenBSD: l2tp_ctrl.c,v 1.17 2014/05/07 01:20:53 tedu Exp $ */
/*-
* Copyright (c) 2009 Internet Initiative Japan Inc.
@@ -26,7 +26,7 @@
* SUCH DAMAGE.
*/
/**@file Control connection processing functions for L2TP LNS */
-/* $Id: l2tp_ctrl.c,v 1.16 2013/09/13 03:25:27 yasuoka Exp $ */
+/* $Id: l2tp_ctrl.c,v 1.17 2014/05/07 01:20:53 tedu Exp $ */
#include <sys/types.h>
#include <sys/param.h>
#include <sys/time.h>
@@ -106,13 +106,8 @@ static u_int l2tp_ctrl_id_seq = 0;
l2tp_ctrl *
l2tp_ctrl_create(void)
{
- l2tp_ctrl *_this;
-
- if ((_this = malloc(sizeof(l2tp_ctrl))) == NULL)
- return NULL;
- memset(_this, 0, sizeof(l2tp_ctrl));
- return (l2tp_ctrl *)_this;
+ return calloc(1, sizeof(l2tp_ctrl));
}
/**