utmp: no need to zero a struct before overwriting it with memcpy
authorMichal Schmidt <mschmidt@redhat.com>
Sun, 6 Nov 2011 22:07:54 +0000 (23:07 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Mon, 7 Nov 2011 00:10:34 +0000 (01:10 +0100)
src/utmp-wtmp.c

index e7b2e3c..98c1a25 100644 (file)
@@ -242,8 +242,6 @@ int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) {
         if (found->ut_pid != pid)
                 return 0;
 
-        zero(store);
-
         memcpy(&store, &lookup, sizeof(store));
         store.ut_type = DEAD_PROCESS;
         store.ut_exit.e_termination = code;