Mercurial > dropbear
diff listener.c @ 1459:06d52bcb8094
Pointer parameter could be declared as pointing to const
author | Francois Perrad <francois.perrad@gadz.org> |
---|---|
date | Sat, 19 Aug 2017 17:16:13 +0200 |
parents | 2b4fd440399d |
children | 58a74cb829b8 |
line wrap: on
line diff
--- a/listener.c Sat Aug 12 20:51:58 2017 +0200 +++ b/listener.c Sat Aug 19 17:16:13 2017 +0200 @@ -53,7 +53,7 @@ } -void handle_listeners(fd_set * readfds) { +void handle_listeners(const fd_set * readfds) { unsigned int i, j; struct Listener *listener; @@ -76,7 +76,7 @@ /* acceptor(int fd, void* typedata) is a function to accept connections, * cleanup(void* typedata) happens when cleaning up */ -struct Listener* new_listener(int socks[], unsigned int nsocks, +struct Listener* new_listener(const int socks[], unsigned int nsocks, int type, void* typedata, void (*acceptor)(struct Listener* listener, int sock), void (*cleanup)(struct Listener*)) {