]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
setarch: fix compiler warnings [-Wsign-compare]
authorKarel Zak <kzak@redhat.com>
Mon, 1 Aug 2011 11:16:21 +0000 (13:16 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 1 Aug 2011 11:16:21 +0000 (13:16 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/setarch.c

index 5f187a764a181ce2558620af6153d9155f446c22..35efca4a99a5717bdc374dc95690cd050bd9780c 100644 (file)
@@ -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);