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]
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
17804d7f0a
commit
956b78e8e3
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user