diff options
author | Christoph Lipka <clipka@de.adit-jv.com> | 2018-12-20 14:58:19 +0100 |
---|---|---|
committer | Christoph Lipka <clipka@de.adit-jv.com> | 2018-12-21 10:23:41 +0100 |
commit | dca8ab254aa0a687c32009079d85e4d8f960b213 (patch) | |
tree | e63b6a552fd9f61873892110a56a89ef354864cd /src/daemon/dlt_daemon_unix_socket.c | |
parent | 0d0c74640c8b792db37cb9f884f89f7561ea551f (diff) | |
download | DLT-daemon-dca8ab254aa0a687c32009079d85e4d8f960b213.tar.gz |
Code beautification using uncrustify
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Diffstat (limited to 'src/daemon/dlt_daemon_unix_socket.c')
-rw-r--r-- | src/daemon/dlt_daemon_unix_socket.c | 15 |
1 files changed, 5 insertions, 10 deletions
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); } |