From dca8ab254aa0a687c32009079d85e4d8f960b213 Mon Sep 17 00:00:00 2001 From: Christoph Lipka Date: Thu, 20 Dec 2018 14:58:19 +0100 Subject: Code beautification using uncrustify Signed-off-by: Christoph Lipka --- src/daemon/dlt_daemon_unix_socket.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/daemon/dlt_daemon_unix_socket.c') diff --git a/src/daemon/dlt_daemon_unix_socket.c b/src/daemon/dlt_daemon_unix_socket.c index 0ed92ad..743035a 100644 --- a/src/daemon/dlt_daemon_unix_socket.c +++ b/src/daemon/dlt_daemon_unix_socket.c @@ -47,14 +47,12 @@ int dlt_daemon_unix_socket_open(int *sock, char *sock_path, int type, int mask) struct sockaddr_un addr; int old_mask; - if (sock == NULL || sock_path == NULL) - { + if ((sock == NULL) || (sock_path == NULL)) { dlt_log(LOG_ERR, "dlt_daemon_unix_socket_open: arguments invalid"); return -1; } - if ((*sock = socket(AF_UNIX, type, 0)) == -1) - { + if ((*sock = socket(AF_UNIX, type, 0)) == -1) { dlt_log(LOG_WARNING, "unix socket: socket() error"); return -1; } @@ -68,14 +66,12 @@ int dlt_daemon_unix_socket_open(int *sock, char *sock_path, int type, int mask) /* set appropriate access permissions */ old_mask = umask(mask); - if (bind(*sock, (struct sockaddr *) &addr, sizeof(addr)) == -1) - { + if (bind(*sock, (struct sockaddr *)&addr, sizeof(addr)) == -1) { dlt_log(LOG_WARNING, "unix socket: bind() error"); return -1; } - if (listen(*sock, 1) == -1) - { + if (listen(*sock, 1) == -1) { dlt_log(LOG_WARNING, "unix socket: listen error"); return -1; } @@ -90,8 +86,7 @@ int dlt_daemon_unix_socket_close(int sock) { int ret = close(sock); - if (ret != 0) - { + if (ret != 0) { sprintf(err_string, "unix socket close failed: %s", strerror(errno)); dlt_log(LOG_WARNING, err_string); } -- cgit v1.2.1