style: remove extra const keyword from interfaces
Const variables in prototypes don't add much value, but make the code larger and redundant. Remove these const keywords. Note, this doesn't apply to pointers to const memory.
This commit is contained in:
18
src/sock.h
18
src/sock.h
@@ -30,16 +30,16 @@ void sock_shutdown(void);
|
||||
|
||||
int sock_error(void);
|
||||
|
||||
sock_t sock_connect(const char *const host, const unsigned short port);
|
||||
int sock_close(const sock_t sock);
|
||||
sock_t sock_connect(const char *host, unsigned short port);
|
||||
int sock_close(sock_t sock);
|
||||
|
||||
int sock_set_blocking(const sock_t sock);
|
||||
int sock_set_nonblocking(const sock_t sock);
|
||||
int sock_read(const sock_t sock, void *const buff, const size_t len);
|
||||
int sock_write(const sock_t sock, const void *const buff, const size_t len);
|
||||
int sock_is_recoverable(const int error);
|
||||
int sock_set_blocking(sock_t sock);
|
||||
int sock_set_nonblocking(sock_t sock);
|
||||
int sock_read(sock_t sock, void *buff, size_t len);
|
||||
int sock_write(sock_t sock, const void *buff, size_t len);
|
||||
int sock_is_recoverable(int error);
|
||||
/* checks for an error after connect, return 0 if connect successful */
|
||||
int sock_connect_error(const sock_t sock);
|
||||
int sock_set_keepalive(const sock_t sock, int timeout, int interval);
|
||||
int sock_connect_error(sock_t sock);
|
||||
int sock_set_keepalive(sock_t sock, int timeout, int interval);
|
||||
|
||||
#endif /* __LIBSTROPHE_SOCK_H__ */
|
||||
|
||||
Reference in New Issue
Block a user