diff options
author | Francois Perrad <francois.perrad@gadz.org> | 2017-08-19 22:39:53 +0200 |
---|---|---|
committer | Francois Perrad <francois.perrad@gadz.org> | 2017-08-19 22:39:53 +0200 |
commit | 598056d1686127285c389cacbdd20707c350d05a (patch) | |
tree | d821ca44d56c707bd3e6fe35f5cb58ff6eb1ccda /listener.c | |
parent | 89e64c631ec8dee41ec4de888548d36887b6ec98 (diff) |
Pointer parameter could be declared as pointing to const (callback)
Diffstat (limited to 'listener.c')
-rw-r--r-- | listener.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -78,8 +78,8 @@ void handle_listeners(const fd_set * readfds) { * cleanup(void* typedata) happens when cleaning up */ 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*)) { + void (*acceptor)(const struct Listener* listener, int sock), + void (*cleanup)(const struct Listener*)) { unsigned int i, j; struct Listener *newlisten = NULL; @@ -132,8 +132,8 @@ struct Listener* new_listener(const int socks[], unsigned int nsocks, /* Return the first listener which matches the type-specific comparison * function. Particularly needed for global requests, like tcp */ -struct Listener * get_listener(int type, void* typedata, - int (*match)(void*, void*)) { +struct Listener * get_listener(int type, const void* typedata, + int (*match)(const void*, const void*)) { unsigned int i; struct Listener* listener; |