1. 15 8月, 2010 1 次提交
    • J
      hwmon: (k8temp) Adjust confusing if indentation · df149d02
      Julia Lawall 提交于
      Move the if(err) statement after the if into the if branch indicated by its
      indentation.  The preceding if(err) test implies that err cannot be nonzero
      unless the if branch is taken.
      
      The semantic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable braces5@
      position p1,p2;
      statement S1,S2;
      @@
      
      (
      if (...) { ... }
      |
      if (...) S1@p1 S2@p2
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      if (p1[0].column == p2[0].column):
       cocci.print_main("branch",p4)
       cocci.print_secs("after",p5)
      // </smpl>  
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      df149d02
  2. 14 8月, 2010 39 次提交