diff options
author | Greg KH <gregkh@linuxfoundation.org> | 2014-01-31 06:51:32 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-07-05 14:19:21 -0400 |
commit | 5cf9be60caba7604038d167e9d0e2deea2a2676b (patch) | |
tree | 45d7082d85d1ef1530c793765e4f08236a88674b /systemd | |
parent | d109c7035f17d158b0c79e3f907db02379c2bba1 (diff) | |
download | python-systemd-5cf9be60caba7604038d167e9d0e2deea2a2676b.tar.gz |
use memzero(foo, length); for all memset(foo, 0, length); calls
In trying to track down a stupid linker bug, I noticed a bunch of
memset() calls that should be using memzero() to make it more "obvious"
that the options are correct (i.e. 0 is not the length, but the data to
set). So fix up all current calls to memset(foo, 0, length) to
memzero(foo, length).
Diffstat (limited to 'systemd')
-rw-r--r-- | systemd/_journal.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/systemd/_journal.c b/systemd/_journal.c index f8e0b4f..669c22c 100644 --- a/systemd/_journal.c +++ b/systemd/_journal.c @@ -22,6 +22,7 @@ #include <Python.h> #include <alloca.h> +#include "util.h" #define SD_JOURNAL_SUPPRESS_LOCATION #include <systemd/sd-journal.h> @@ -41,7 +42,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*)); - memset(encoded, 0, argc * sizeof(PyObject*)); + memzero(encoded, argc * sizeof(PyObject*)); /* Allocate sufficient iovector space for the arguments. */ iov = alloca(argc * sizeof(struct iovec)); |