Mercurial > dropbear
diff listener.c @ 1460:58a74cb829b8
Pointer parameter could be declared as pointing to const (callback)
author | Francois Perrad <francois.perrad@gadz.org> |
---|---|
date | Sat, 19 Aug 2017 22:39:53 +0200 |
parents | 06d52bcb8094 |
children | ce3ce75a6e04 |
line wrap: on
line diff
--- a/listener.c Sat Aug 19 17:16:13 2017 +0200 +++ b/listener.c Sat Aug 19 22:39:53 2017 +0200 @@ -78,8 +78,8 @@ * 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 @@ /* 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;