aboutgitcodebugslistschat
path: root/tap.c
diff options
context:
space:
mode:
Diffstat (limited to 'tap.c')
-rw-r--r--tap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tap.c b/tap.c
index 88eed88..d6f962e 100644
--- a/tap.c
+++ b/tap.c
@@ -1037,9 +1037,13 @@ static void tap_sock_unix_init(struct ctx *c)
snprintf(path, UNIX_PATH_MAX - 1, UNIX_SOCK_PATH, i);
ex = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0);
- if (ex < 0)
+ if (ex < 0) {
die("UNIX domain socket check: %s", strerror(errno));
+ /* Silence cppcheck's invalidFunctionArg for 'ex' */
+ return;
+ }
+
ret = connect(ex, (const struct sockaddr *)&addr, sizeof(addr));
if (!ret || (errno != ENOENT && errno != ECONNREFUSED &&
errno != EACCES)) {