Remove trailing whitespace in socket.h

This commit is contained in:
James Benton 2016-07-24 23:41:21 +01:00
parent 9f0676c2a8
commit 67cc02c52b

View File

@ -9,7 +9,7 @@
* \ingroup nsysnet * \ingroup nsysnet
* @{ * @{
*/ */
#define SOL_SOCKET 0xFFFF #define SOL_SOCKET 0xFFFF
#define PF_UNSPEC 0 #define PF_UNSPEC 0
@ -51,19 +51,22 @@
typedef uint32_t socklen_t; typedef uint32_t socklen_t;
typedef uint16_t sa_family_t; typedef uint16_t sa_family_t;
struct sockaddr { struct sockaddr
sa_family_t sa_family; {
char sa_data[]; sa_family_t sa_family;
char sa_data[];
}; };
struct sockaddr_storage { struct sockaddr_storage
sa_family_t ss_family; {
char __ss_padding[26]; sa_family_t ss_family;
char __ss_padding[26];
}; };
struct linger { struct linger
int l_onoff; {
int l_linger; int l_onoff;
int l_linger;
}; };
#ifdef __cplusplus #ifdef __cplusplus
@ -74,93 +77,93 @@ void
socket_lib_init(); socket_lib_init();
int int
accept(int sockfd, accept(int sockfd,
struct sockaddr *addr, struct sockaddr *addr,
socklen_t *addrlen); socklen_t *addrlen);
int int
bind(int sockfd, bind(int sockfd,
const struct sockaddr *addr, const struct sockaddr *addr,
socklen_t addrlen); socklen_t addrlen);
int int
closesocket(int sockfd); closesocket(int sockfd);
int int
connect(int sockfd, connect(int sockfd,
const struct sockaddr *addr, const struct sockaddr *addr,
socklen_t addrlen); socklen_t addrlen);
int int
getpeername(int sockfd, getpeername(int sockfd,
struct sockaddr *addr, struct sockaddr *addr,
socklen_t *addrlen); socklen_t *addrlen);
int int
getsockname(int sockfd, getsockname(int sockfd,
struct sockaddr *addr, struct sockaddr *addr,
socklen_t *addrlen); socklen_t *addrlen);
int int
getsockopt(int sockfd, getsockopt(int sockfd,
int level, int level,
int optname, int optname,
void *optval, void *optval,
socklen_t *optlen); socklen_t *optlen);
int int
listen(int sockfd, listen(int sockfd,
int backlog); int backlog);
ssize_t ssize_t
recv(int sockfd, recv(int sockfd,
void *buf, void *buf,
size_t len, size_t len,
int flags); int flags);
ssize_t ssize_t
recvfrom(int sockfd, recvfrom(int sockfd,
void *buf, void *buf,
size_t len, size_t len,
int flags, int flags,
struct sockaddr *src_addr, struct sockaddr *src_addr,
socklen_t *addrlen); socklen_t *addrlen);
ssize_t ssize_t
send(int sockfd, send(int sockfd,
const void *buf, const void *buf,
size_t len, size_t len,
int flags); int flags);
ssize_t ssize_t
sendto(int sockfd, sendto(int sockfd,
const void *buf, const void *buf,
size_t len, size_t len,
int flags, int flags,
const struct sockaddr *dest_addr, const struct sockaddr *dest_addr,
socklen_t addrlen); socklen_t addrlen);
int int
setsockopt(int sockfd, setsockopt(int sockfd,
int level, int level,
int optname, int optname,
const void *optval, const void *optval,
socklen_t optlen); socklen_t optlen);
int int
shutdown(int sockfd, shutdown(int sockfd,
int how); int how);
int int
socket(int domain, socket(int domain,
int type, int type,
int protocol); int protocol);
int int
select(int nfds, select(int nfds,
fd_set *readfds, fd_set *readfds,
fd_set *writefds, fd_set *writefds,
fd_set *exceptfds, fd_set *exceptfds,
struct timeval *timeout); struct timeval *timeout);
#ifdef __cplusplus #ifdef __cplusplus