diff options
| author | Lennart Poettering <lennart@poettering.net> | 2014-01-31 12:27:35 +0100 |
|---|---|---|
| committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-07-05 14:19:21 -0400 |
| commit | 5e1d42a18032bff6863784d18671a3cb65cae0c3 (patch) | |
| tree | 9dd4819d0bdd86fbc460c0bd0eb69cf669f54948 | |
| parent | 5cf9be60caba7604038d167e9d0e2deea2a2676b (diff) | |
| download | python-systemd-5e1d42a18032bff6863784d18671a3cb65cae0c3.tar.gz | |
util: use alloca0() intead of alloca() + memzero()
| -rw-r--r-- | systemd/_journal.c | 3 |
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)); |
