• Phil Sutter's avatar
    ip{,6}tunnel: align do_tunnels_list() a bit · c4527d7b
    Phil Sutter authored
    In iptunnel, declare loop variables inside the loop as done in
    ip6tunnel.
    
    Fix and simplify goto logic in ip6tunnel:
    - Failure to read over header lines would have left fp opened.
    - By returning directly upon fopen() failure, fp can be closed
      unconditionally in the end.
    
    Use the same goto logic in iptunnel, as well.
    Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
    c4527d7b
ip6tunnel.c 14.1 KB