X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttsessiondcomm%2Fliblttsessiondcomm.c;h=581d5c4199a23d69de3f21e0e73ba60e76dba7c5;hp=9c72a918ccc23d94584df20a3d0bb139b5ce7c6a;hb=686204ab689fc20afc4aaf014f1f4a877b1e581d;hpb=826d496db7f18f2ae1f7e0d2f4fc381144ed04a4 diff --git a/liblttsessiondcomm/liblttsessiondcomm.c b/liblttsessiondcomm/liblttsessiondcomm.c index 9c72a918c..581d5c419 100644 --- a/liblttsessiondcomm/liblttsessiondcomm.c +++ b/liblttsessiondcomm/liblttsessiondcomm.c @@ -67,27 +67,27 @@ const char *lttcomm_get_readable_code(enum lttcomm_return_code code) */ int lttcomm_connect_unix_sock(const char *pathname) { - struct sockaddr_un sun; - int fd; + struct sockaddr_un sun; + int fd; int ret = 1; - fd = socket(PF_UNIX, SOCK_STREAM, 0); + fd = socket(PF_UNIX, SOCK_STREAM, 0); if (fd < 0) { perror("socket"); goto error; } - memset(&sun, 0, sizeof(sun)); - sun.sun_family = AF_UNIX; - strncpy(sun.sun_path, pathname, sizeof(sun.sun_path)); + memset(&sun, 0, sizeof(sun)); + sun.sun_family = AF_UNIX; + strncpy(sun.sun_path, pathname, sizeof(sun.sun_path)); - ret = connect(fd, (struct sockaddr *) &sun, sizeof(sun)); - if (ret < 0) { - perror("connect"); + ret = connect(fd, (struct sockaddr *) &sun, sizeof(sun)); + if (ret < 0) { + perror("connect"); goto error; - } + } - return fd; + return fd; error: return -1;