Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter/source/wl_sock.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/wl_sock.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/wl_sock.cc b/noncore/net/wellenreiter/libwellenreiter/source/wl_sock.cc index 4942fba..db6b7b8 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/wl_sock.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/wl_sock.cc @@ -10,13 +10,13 @@ /* Setup UDP Socket for incoming commands */ int wl_setupsock(const char *host, int port) { struct sockaddr_in saddr; int sock; - if((sock=socket(AF_INET, SOCK_DGRAM, 0)) < 0) + if((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { wl_logerr("Cannot set up socket: %s", strerror(errno)); return -1; } memset(&saddr, 0, sizeof(saddr)); @@ -50,13 +50,13 @@ int wl_send(const char *host, int port, const char *string, ...) saddr.sin_family = AF_INET; saddr.sin_port = htons(port); saddr.sin_addr.s_addr = inet_addr(host); /* Setup socket */ - if((sock=socket(AF_INET, SOCK_DGRAM, 0)) < 0) + if((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { wl_logerr("Cannot set up socket: %s", strerror(errno)); return 0; } if(sendto(sock, buffer, sizeof(buffer), 0, (struct sockaddr *)&saddr, sizeof(saddr)) < 0) @@ -73,13 +73,13 @@ int wl_send(const char *host, int port, const char *string, ...) } /* Check for new messages on commsock */ int wl_recv(int *sock, char *out, int maxlen) { struct sockaddr_in *cliaddr; - socklen_t len=sizeof(struct sockaddr); + socklen_t len = sizeof(struct sockaddr); char retval[3]; memset(out, 0, maxlen); if(recvfrom(*sock, out, maxlen - 1, 0, (struct sockaddr *)cliaddr, &len) < 0) return -1; |