summaryrefslogtreecommitdiff
path: root/src/libsystemd-daemon
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2011-06-16 08:51:14 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-07-23 00:06:06 +0200
commit956b78e8e3636bbf04e264ca96128edc2cbf3626 (patch)
treed0a6aadc103d7d907b66a2fe20a6012f4865809c /src/libsystemd-daemon
parent17804d7f0a4002d4f0b8f1dc6e25fcca9381c13e (diff)
sd-daemon: remove unnecessary memset calls
There is no point in clearing the bits of a "struct stat" when the very next statement just calls stat or fstat to fill in that same memory. [zj: two more places]
Diffstat (limited to 'src/libsystemd-daemon')
-rw-r--r--src/libsystemd-daemon/sd-daemon.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/libsystemd-daemon/sd-daemon.c b/src/libsystemd-daemon/sd-daemon.c
index 763e079b4e..863ac75290 100644
--- a/src/libsystemd-daemon/sd-daemon.c
+++ b/src/libsystemd-daemon/sd-daemon.c
@@ -152,7 +152,6 @@ _sd_export_ int sd_is_fifo(int fd, const char *path) {
if (fd < 0)
return -EINVAL;
- memset(&st_fd, 0, sizeof(st_fd));
if (fstat(fd, &st_fd) < 0)
return -errno;
@@ -162,7 +161,6 @@ _sd_export_ int sd_is_fifo(int fd, const char *path) {
if (path) {
struct stat st_path;
- memset(&st_path, 0, sizeof(st_path));
if (stat(path, &st_path) < 0) {
if (errno == ENOENT || errno == ENOTDIR)