summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-01-31 12:27:35 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-07-05 14:19:21 -0400
commit5e1d42a18032bff6863784d18671a3cb65cae0c3 (patch)
tree9dd4819d0bdd86fbc460c0bd0eb69cf669f54948
parent5cf9be60caba7604038d167e9d0e2deea2a2676b (diff)
downloadpython-systemd-5e1d42a18032bff6863784d18671a3cb65cae0c3.tar.gz
util: use alloca0() intead of alloca() + memzero()
-rw-r--r--systemd/_journal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/systemd/_journal.c b/systemd/_journal.c
index 669c22c..8cc6d3e 100644
--- a/systemd/_journal.c
+++ b/systemd/_journal.c
@@ -41,8 +41,7 @@ static PyObject *journal_sendv(PyObject *self, PyObject *args) {
/* Allocate an array for the argument strings */
argc = PyTuple_Size(args);
- encoded = alloca(argc * sizeof(PyObject*));
- memzero(encoded, argc * sizeof(PyObject*));
+ encoded = alloca0(argc * sizeof(PyObject*));
/* Allocate sufficient iovector space for the arguments. */
iov = alloca(argc * sizeof(struct iovec));