This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Drop two useless variables from known-dwarf.awk


Signed-off-by: Petr Machata <pmachata@redhat.com>
---
 config/ChangeLog       |  5 +++++
 config/known-dwarf.awk | 11 ++---------
 2 files changed, 7 insertions(+), 9 deletions(-)
 mode change 100644 => 100755 config/known-dwarf.awk

diff --git a/config/ChangeLog b/config/ChangeLog
index 1b4e896..409e2b1 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2015-02-20  Petr Machata  <pmachata@redhat.com>
+
+	* known-dwarf.awk (END): Drop useless variables lo, hi.  Merge two
+	continue-checks in one.
+
 2014-12-18  Mark Wielaard  <mjw@redhat.com>
 
 	* elfutils.spec.in: Update for 0.161.
diff --git a/config/known-dwarf.awk b/config/known-dwarf.awk
old mode 100644
new mode 100755
index 52ec5b6..4d89f0f
--- a/config/known-dwarf.awk
+++ b/config/known-dwarf.awk
@@ -1,6 +1,6 @@
 #!/bin/gawk -f
 
-## Copyright (C) 2012 Red Hat, Inc.
+## Copyright (C) 2012, 2015 Red Hat, Inc.
 ##
 ## This file is part of elfutils.
 ##
@@ -48,19 +48,12 @@ END {
     if (what && what != set) continue;
     split(DW[set], elts, ",");
     m = asort(elts);
-    lo = hi = "";
     if (m == 0) continue;
     print "\n#define ALL_KNOWN_DW_" set " \\";
     for (j = 1; j <= m; ++j) {
       elt = elts[j];
-      if (elt ~ /(lo|low)_user$/) {
-	lo = elt;
+      if (elt ~ /(low?|hi|high)_user$/)
 	continue;
-      }
-      if (elt ~ /(hi|high)_user$/) {
-	hi = elt;
-	continue;
-      }
       if (comment[set, elt])
 	print "  ONE_KNOWN_DW_" set "_DESC (" elt ", DW_" set "_" elt \
 	  ", \"" comment[set, elt] "\") \\";
-- 
2.1.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]