[PATCH] systemctl: sd_is_fifo: remove unnecessary memset calls

Jim Meyering meyering at redhat.com
Wed Jun 15 23:43:48 PDT 2011


---
 src/sd-daemon.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/sd-daemon.c b/src/sd-daemon.c
index d9f23d6..5668390 100644
--- a/src/sd-daemon.c
+++ b/src/sd-daemon.c
@@ -142,7 +142,6 @@ _sd_hidden_ 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;

@@ -152,7 +151,6 @@ _sd_hidden_ 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)
--
1.7.6.rc0.293.g40857


More information about the systemd-devel mailing list