summaryrefslogtreecommitdiff
path: root/src/core
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/core
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/core')
-rw-r--r--src/core/load-fragment.c1
-rw-r--r--src/core/service.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 7fcd63a17a..bbd82b9d24 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -2287,7 +2287,6 @@ static int load_from_path(Unit *u, const char *path) {
goto finish;
}
- zero(st);
if (fstat(fileno(f), &st) < 0) {
r = -errno;
goto finish;
diff --git a/src/core/service.c b/src/core/service.c
index 30598de9b8..1c127bdbcb 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -564,7 +564,6 @@ static int service_load_sysv_path(Service *s, const char *path) {
goto finish;
}
- zero(st);
if (fstat(fileno(f), &st) < 0) {
r = -errno;
goto finish;