From bb196d4fd31f147c177e5ed28b9ad82718248daa Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 22 Apr 2010 22:32:17 +0400 Subject: [PATCH] outbin: Drop current_section variable There is no need for it anymore. Reported-by: "H. Peter Anvin" Signed-off-by: Cyrill Gorcunov --- output/outbin.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/output/outbin.c b/output/outbin.c index 2492c098..dca7721c 100644 --- a/output/outbin.c +++ b/output/outbin.c @@ -152,7 +152,6 @@ static struct Reloc { struct Section *target; } *relocs, **reloctail; -static int32_t current_section; static uint64_t origin; static int origin_defined; @@ -1242,8 +1241,7 @@ static int32_t bin_secname(char *name, int pass, int *bits) *bits = 16; sec = find_section_by_name(".text"); sec->flags |= TYPE_DEFINED | TYPE_PROGBITS; - current_section = sec->vstart_index; - return current_section; + return sec->vstart_index; } /* Attempt to find the requested section. If it does not @@ -1276,9 +1274,7 @@ static int32_t bin_secname(char *name, int pass, int *bits) sec->flags |= TYPE_DEFINED | TYPE_PROGBITS; #endif - /* Set the current section and return. */ - current_section = sec->vstart_index; - return current_section; + return sec->vstart_index; } static int bin_directive(enum directives directive, char *args, int pass) @@ -1444,7 +1440,7 @@ static void binfmt_init(void) last_section->labels = NULL; last_section->labels_end = &(last_section->labels); last_section->start_index = seg_alloc(); - last_section->vstart_index = current_section = seg_alloc(); + last_section->vstart_index = seg_alloc(); } /* Generate binary file output */ -- 2.11.4.GIT