tdecacqu / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
68bdd43
From b8e47420b32b52619c6c49c98a663bee7929ccbe Mon Sep 17 00:00:00 2001
68bdd43
From: Michal Schmidt <mschmidt@redhat.com>
68bdd43
Date: Sun, 6 Nov 2011 23:07:54 +0100
68bdd43
Subject: [PATCH 2/4] utmp: no need to zero a struct before overwriting it
68bdd43
 with memcpy
68bdd43
68bdd43
---
68bdd43
 src/utmp-wtmp.c |    2 --
68bdd43
 1 files changed, 0 insertions(+), 2 deletions(-)
68bdd43
68bdd43
diff --git a/src/utmp-wtmp.c b/src/utmp-wtmp.c
68bdd43
index e7b2e3c..98c1a25 100644
68bdd43
--- a/src/utmp-wtmp.c
68bdd43
+++ b/src/utmp-wtmp.c
68bdd43
@@ -242,8 +242,6 @@ int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) {
68bdd43
         if (found->ut_pid != pid)
68bdd43
                 return 0;
68bdd43
 
68bdd43
-        zero(store);
68bdd43
-
68bdd43
         memcpy(&store, &lookup, sizeof(store));
68bdd43
         store.ut_type = DEAD_PROCESS;
68bdd43
         store.ut_exit.e_termination = code;
68bdd43
-- 
68bdd43
1.7.7.5
68bdd43