Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/lib/libsa Don't hide first = 1 assignment inside for(), ...
details: https://anonhg.NetBSD.org/src/rev/e02f2d589ff8
branches: trunk
changeset: 353021:e02f2d589ff8
user: uwe <uwe%NetBSD.org@localhost>
date: Mon Apr 17 17:44:48 2017 +0000
description:
Don't hide first = 1 assignment inside for(), that just obscures the
loop. Same object code is generated.
diffstat:
sys/lib/libsa/loadfile_elf32.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r dd7dad8f1f07 -r e02f2d589ff8 sys/lib/libsa/loadfile_elf32.c
--- a/sys/lib/libsa/loadfile_elf32.c Mon Apr 17 16:42:07 2017 +0000
+++ b/sys/lib/libsa/loadfile_elf32.c Mon Apr 17 17:44:48 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: loadfile_elf32.c,v 1.36 2017/02/23 12:13:59 nonaka Exp $ */
+/* $NetBSD: loadfile_elf32.c,v 1.37 2017/04/17 17:44:48 uwe Exp $ */
/*
* Copyright (c) 1997, 2008 The NetBSD Foundation, Inc.
@@ -321,7 +321,8 @@
goto freephdr;
}
- for (first = 1, i = 0; i < elf->e_phnum; i++) {
+ first = 1;
+ for (i = 0; i < elf->e_phnum; i++) {
internalize_phdr(elf->e_ident[EI_DATA], &phdr[i]);
#ifndef MD_LOADSEG /* Allow processor ABI specific segment loads */
@@ -471,7 +472,8 @@
* string table that isn't referenced by a symbol
* table.
*/
- for (first = 1, i = 0; i < elf->e_shnum; i++) {
+ first = 1;
+ for (i = 0; i < elf->e_shnum; i++) {
if (i == elf->e_shstrndx) {
/* already loaded this section */
continue;
Home |
Main Index |
Thread Index |
Old Index