]> git.e2factory.org Git - e2factory.git/commitdiff
purge conditional loops
authorOskar Schirmer <os@emlix.com>
Tue, 27 Oct 2009 10:29:59 +0000 (11:29 +0100)
committerGordon Hecker <gh@emlix.com>
Wed, 28 Oct 2009 14:43:17 +0000 (15:43 +0100)
Signed-off-by: Oskar Schirmer <os@emlix.com>
Acked-by: Gordon Hecker <gh@emlix.com>
local/ls-project.lua

index 3c67d767d4e6eaf770838710c022b19227c34d6a..c417a1334927cb7677da98ff98c352da12e2e1b6 100755 (executable)
@@ -124,8 +124,8 @@ if opts.dot or opts["dot-sources"] then
     else
       print(string.format("  \"%s\"", r))
     end
-    for _, src in ipairs(res.sources) do
-      if opts["dot-sources"] then
+    if opts["dot-sources"] then
+      for _, src in ipairs(res.sources) do
         if opts.swap then
           print(string.format("  \"%s-src\" %s \"%s\"", src, arrow, r))
         else
@@ -134,8 +134,8 @@ if opts.dot or opts["dot-sources"] then
       end
     end
   end
-  for _, s in ipairs(info.sources_sorted) do
-    if opts["dot-sources"] then
+  if opts["dot-sources"] then
+    for _, s in ipairs(info.sources_sorted) do
       print(string.format("  \"%s-src\" [label=\"%s\", shape=box]", s, s))
     end
   end