Commit 3dd03b6e authored by Pavel Emelyanov's avatar Pavel Emelyanov

inet: Remove is_bound fn

It's now quite simple. It's better to open-code one.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 6fd87cd9
...@@ -344,13 +344,6 @@ int inet_collect_one(struct nlmsghdr *h, int family, int type, int proto) ...@@ -344,13 +344,6 @@ int inet_collect_one(struct nlmsghdr *h, int family, int type, int proto)
return ret; return ret;
} }
static bool is_bound(struct inet_sk_info *ii)
{
/* zero port is reserved */
return ii->ie->src_port;
}
static int open_inet_sk(struct file_desc *d); static int open_inet_sk(struct file_desc *d);
static int post_open_inet_sk(struct file_desc *d, int sk); static int post_open_inet_sk(struct file_desc *d, int sk);
...@@ -483,7 +476,7 @@ static int open_inet_sk(struct file_desc *d) ...@@ -483,7 +476,7 @@ static int open_inet_sk(struct file_desc *d)
* bind() and listen(), and that's all. * bind() and listen(), and that's all.
*/ */
if (is_bound(ii)) { if (ie->src_port) {
if (inet_bind(sk, ii)) if (inet_bind(sk, ii))
goto err; goto err;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment