stat-util: fix fd_is_network_ns()

This was broken in 77f9fa3b8e. My fault.

Fixes: #8543
This commit is contained in:
Lennart Poettering 2018-03-23 09:47:04 +01:00
parent 19496554e2
commit 29f74559d4
1 changed files with 2 additions and 1 deletions

View File

@ -254,7 +254,8 @@ int fd_is_network_ns(int fd) {
if (r <= 0)
return r;
if (ioctl(fd, NS_GET_NSTYPE) < 0)
r = ioctl(fd, NS_GET_NSTYPE);
if (r < 0)
return -errno;
return r == CLONE_NEWNET;