When starting some scopes, the newly allocated struct is memset'ed with zero but this is unneeded since the allocator always returns zeroed memory. Remove the unneeded call to memset(). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- scope.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/scope.c b/scope.c index 420c0f5a3f51..0e4fb3b42150 100644 --- a/scope.c +++ b/scope.c @@ -68,7 +68,6 @@ void rebind_scope(struct symbol *sym, struct scope *new) static void start_scope(struct scope **s) { struct scope *scope = __alloc_scope(0); - memset(scope, 0, sizeof(*scope)); scope->next = *s; *s = scope; } @@ -77,7 +76,6 @@ void start_file_scope(void) { struct scope *scope = __alloc_scope(0); - memset(scope, 0, sizeof(*scope)); scope->next = &builtin_scope; file_scope = scope; -- 2.26.2