Commit 036d4053 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

zdtm unix_sock: don't use errno

In this place, errno is not being set and can be 0 or some random value,
so we should not use it. In case errno happens to be 0, we end up returning
a success status from a function while we should have returned a failure.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Acked-by: 's avatarAndrew Vagin <avagin@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 40978ef3
......@@ -110,9 +110,8 @@ static int setup_clnt_sock(void)
int ret = 0;
if (fill_sock_name(&name, filename) < 0) {
ret = -errno;
pr_perror("filename \"%s\" is too long", filename);
return ret;
return -1;
}
sock = socket(PF_LOCAL, SOCK_STREAM, 0);
......
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