]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ss: Get rid of useless goto in handle_follow_request()
authorPhil Sutter <phil@nwl.cc>
Fri, 2 Dec 2016 10:39:57 +0000 (11:39 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 2 Dec 2016 22:07:46 +0000 (14:07 -0800)
Signed-off-by: Phil Sutter <phil@nwl.cc>
misc/ss.c

index 446a82a45aa5ce7cee3087bd09d6652d69a1bf54..4bc0772824341ef0bd30f73cacabc610dde83a2d 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -3675,7 +3675,7 @@ static int generic_show_sock(const struct sockaddr_nl *addr,
 
 static int handle_follow_request(struct filter *f)
 {
-       int ret = -1;
+       int ret = 0;
        int groups = 0;
        struct rtnl_handle rth;
 
@@ -3698,10 +3698,8 @@ static int handle_follow_request(struct filter *f)
        rth.local.nl_pid = 0;
 
        if (rtnl_dump_filter(&rth, generic_show_sock, f))
-               goto Exit;
+               ret = -1;
 
-       ret = 0;
-Exit:
        rtnl_close(&rth);
        return ret;
 }