This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via f025da7131d921a4207b31bd5af4490da9b0ef24 (commit) from fdc44dd4322f624c2a5d8c0be5306f7c45364520 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit f025da7131d921a4207b31bd5af4490da9b0ef24 Author: Maxim Uvarov maxim.uvarov@linaro.org Date: Mon Sep 25 22:33:31 2017 +0300
linux-gen: _fdserver return code cleanup
somewhere we have return (-1) somewhere -1, let's make it common.
Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org
diff --git a/platform/linux-generic/_fdserver.c b/platform/linux-generic/_fdserver.c index d15ddbec..60bb9139 100644 --- a/platform/linux-generic/_fdserver.c +++ b/platform/linux-generic/_fdserver.c @@ -160,7 +160,7 @@ static int send_fdserver_msg(int sock, int command, res = sendmsg(sock, &socket_message, 0); if (res < 0) { ODP_ERR("send_fdserver_msg: %s\n", strerror(errno)); - return(-1); + return -1; }
return 0; @@ -206,7 +206,7 @@ static int recv_fdserver_msg(int sock, int *command, /* receive the message */ if (recvmsg(sock, &socket_message, MSG_CMSG_CLOEXEC) < 0) { ODP_ERR("recv_fdserver_msg: %s\n", strerror(errno)); - return(-1); + return -1; }
*command = msg.command; @@ -251,7 +251,7 @@ static int get_socket(void) s_sock = socket(AF_UNIX, SOCK_STREAM, 0); if (s_sock == -1) { ODP_ERR("cannot connect to server: %s\n", strerror(errno)); - return(-1); + return -1; }
remote.sun_family = AF_UNIX; @@ -260,7 +260,7 @@ static int get_socket(void) if (connect(s_sock, (struct sockaddr *)&remote, len) == -1) { ODP_ERR("cannot connect to server: %s\n", strerror(errno)); close(s_sock); - return(-1); + return -1; }
return s_sock; @@ -286,7 +286,7 @@ int _odp_fdserver_register_fd(fd_server_context_e context, uint64_t key, s_sock = get_socket(); if (s_sock < 0) { odp_spinlock_unlock(client_lock); - return(-1); + return -1; }
res = send_fdserver_msg(s_sock, FD_REGISTER_REQ, context, key, @@ -332,7 +332,7 @@ int _odp_fdserver_deregister_fd(fd_server_context_e context, uint64_t key) s_sock = get_socket(); if (s_sock < 0) { odp_spinlock_unlock(client_lock); - return(-1); + return -1; }
res = send_fdserver_msg(s_sock, FD_DEREGISTER_REQ, context, key, -1); @@ -375,7 +375,7 @@ int _odp_fdserver_lookup_fd(fd_server_context_e context, uint64_t key) s_sock = get_socket(); if (s_sock < 0) { odp_spinlock_unlock(client_lock); - return(-1); + return -1; }
res = send_fdserver_msg(s_sock, FD_LOOKUP_REQ, context, key, -1); @@ -418,7 +418,7 @@ static int stop_server(void) s_sock = get_socket(); if (s_sock < 0) { odp_spinlock_unlock(client_lock); - return(-1); + return -1; }
res = send_fdserver_msg(s_sock, FD_SERVERSTOP_REQ, 0, 0, -1); @@ -604,7 +604,7 @@ int _odp_fdserver_init_global(void) sock = socket(AF_UNIX, SOCK_STREAM, 0); if (sock == -1) { ODP_ERR("_odp_fdserver_init_global: %s\n", strerror(errno)); - return(-1); + return -1; }
/* remove previous named socket if it already exists: */ @@ -617,14 +617,14 @@ int _odp_fdserver_init_global(void) if (res == -1) { ODP_ERR("_odp_fdserver_init_global: %s\n", strerror(errno)); close(sock); - return(-1); + return -1; }
/* listen for incoming conections: */ if (listen(sock, FDSERVER_BACKLOG) == -1) { ODP_ERR("_odp_fdserver_init_global: %s\n", strerror(errno)); close(sock); - return(-1); + return -1; }
/* fork a server process: */ @@ -632,7 +632,7 @@ int _odp_fdserver_init_global(void) if (server_pid == -1) { ODP_ERR("Could not fork!\n"); close(sock); - return(-1); + return -1; }
if (server_pid == 0) { /*child */
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/_fdserver.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
hooks/post-receive