[PATCH 17/17] setarch: remove unreachable code

Sami Kerola
2014-09-07T12:43:56Z

Architectures are protected using '#if defined' clauses, making the code
in this removal to be impossible to reach.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
sys-utils/setarch.c | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
index ed2a6a6..43594ad 100644
--- a/sys-utils/setarch.c
+++ b/sys-utils/setarch.c
@@ -233,15 +233,6 @@ static int set_arch(const char *pers, unsigned long options, int list)
pers_value = transitions[i].perval | options;
if (personality(pers_value) == -EINVAL)
return 1;
- uname(&un);
- if (transitions[i].result_arch && strcmp(un.machine, transitions[i].result_arch)) {
- if (strcmp(transitions[i].result_arch, "i386")
- || (strcmp(un.machine, "i486")
- && strcmp(un.machine, "i586")
- && strcmp(un.machine, "i686")
- && strcmp(un.machine, "athlon")))
- errx(EXIT_FAILURE, _("%s: Unrecognized architecture"), pers);
- }
return 0;
}

--
2.1.0