From: Karel Zak Date: Mon, 1 Aug 2011 11:16:21 +0000 (+0200) Subject: setarch: fix compiler warnings [-Wsign-compare] X-Git-Tag: v2.20-rc2~142 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cfe2d24951efb82a1349b21644f43c92ee71ae18;p=thirdparty%2Futil-linux.git setarch: fix compiler warnings [-Wsign-compare] Signed-off-by: Karel Zak --- diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c index 5f187a764a..35efca4a99 100644 --- a/sys-utils/setarch.c +++ b/sys-utils/setarch.c @@ -148,7 +148,7 @@ int set_arch(const char *pers, unsigned long options) { struct utsname un; int i; - unsigned long pers_value, res; + unsigned long pers_value; struct { int perval; @@ -214,8 +214,7 @@ int set_arch(const char *pers, unsigned long options) errx(EXIT_FAILURE, _("%s: Unrecognized architecture"), pers); pers_value = transitions[i].perval | options; - res = set_pers(pers_value); - if(res == -EINVAL) + if (set_pers(pers_value) == -EINVAL) return 1; uname(&un);