comparison 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
comparison
equal deleted inserted replaced
1458:bdd3802c8ac6 1459:06d52bcb8094
51 } 51 }
52 } 52 }
53 } 53 }
54 54
55 55
56 void handle_listeners(fd_set * readfds) { 56 void handle_listeners(const fd_set * readfds) {
57 57
58 unsigned int i, j; 58 unsigned int i, j;
59 struct Listener *listener; 59 struct Listener *listener;
60 int sock; 60 int sock;
61 61
74 } /* Woo brace matching */ 74 } /* Woo brace matching */
75 75
76 76
77 /* acceptor(int fd, void* typedata) is a function to accept connections, 77 /* acceptor(int fd, void* typedata) is a function to accept connections,
78 * cleanup(void* typedata) happens when cleaning up */ 78 * cleanup(void* typedata) happens when cleaning up */
79 struct Listener* new_listener(int socks[], unsigned int nsocks, 79 struct Listener* new_listener(const int socks[], unsigned int nsocks,
80 int type, void* typedata, 80 int type, void* typedata,
81 void (*acceptor)(struct Listener* listener, int sock), 81 void (*acceptor)(struct Listener* listener, int sock),
82 void (*cleanup)(struct Listener*)) { 82 void (*cleanup)(struct Listener*)) {
83 83
84 unsigned int i, j; 84 unsigned int i, j;