From 1f827a477607d0a9dc9520fc6c53c936befb663d Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Mon, 23 Apr 2012 11:37:40 +0300 Subject: [PATCH] os: remove unneeded errno assignment If socket() fails, it will return failure code. No need to reset errno beforehand. Signed-off-by: Pekka Paalanen --- src/wayland-os.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/wayland-os.c b/src/wayland-os.c index 5ff43912..8f75976b 100644 --- a/src/wayland-os.c +++ b/src/wayland-os.c @@ -56,7 +56,6 @@ wl_os_socket_cloexec(int domain, int type, int protocol) int fd; #ifdef SOCK_CLOEXEC - errno = 0; fd = socket(domain, type | SOCK_CLOEXEC, protocol); if (fd >= 0) return fd;