]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
rtla: Remove redundant memset after calloc
authorWander Lairson Costa <wander@redhat.com>
Tue, 6 Jan 2026 11:49:45 +0000 (08:49 -0300)
committerTomas Glozar <tglozar@redhat.com>
Wed, 7 Jan 2026 14:57:55 +0000 (15:57 +0100)
The actions struct is allocated using calloc, which already returns
zeroed memory. The subsequent memset call to zero the 'present' member
is therefore redundant.

Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Link: https://lore.kernel.org/r/20260106133655.249887-10-wander@redhat.com
Signed-off-by: Tomas Glozar <tglozar@redhat.com>
tools/tracing/rtla/src/actions.c

index ace9965ebd55f959f0108a8c0f1d6bdcb077ca66..d9c1db5d97d45f4ac23da07704f35d638ef0f4e5 100644 (file)
@@ -19,8 +19,6 @@ actions_init(struct actions *self)
        self->len = 0;
        self->continue_flag = false;
 
-       memset(&self->present, 0, sizeof(self->present));
-
        /* This has to be set by the user */
        self->trace_output_inst = NULL;
 }