[CRIU] [PATCH 4/5] check: check_so_gets -- Return -1 on error

Cyrill Gorcunov gorcunov at openvz.org
Mon Mar 25 17:26:39 EDT 2013


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 cr-check.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cr-check.c b/cr-check.c
index 421c9bb..bc7d33c 100644
--- a/cr-check.c
+++ b/cr-check.c
@@ -402,19 +402,19 @@ static int check_so_gets(void)
 	sk = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
 	if (sk < 0) {
 		pr_perror("No socket");
-		return 1;
+		return -1;
 	}
 
 	len = 0;
 	if (getsockopt(sk, SOL_SOCKET, SO_GET_FILTER, NULL, &len)) {
 		pr_perror("Can't get socket filter");
-		return 1;
+		return -1;
 	}
 
 	len = sizeof(name);
 	if (getsockopt(sk, SOL_SOCKET, SO_BINDTODEVICE, name, &len)) {
 		pr_perror("Can't get socket bound dev");
-		return 1;
+		return -1;
 	}
 
 	return 0;
-- 
1.8.1.4



More information about the CRIU mailing list