X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=selftest.c;h=3fb5c493fda98a6ff89e6a4b8aed01358098ce3a;hb=bf061dc83602d9ec71591c4e138cc9cd583bcfad;hp=6edbc0d4ecf2016a5f2b050b9dd0b2ba0a4cac79;hpb=bb3c69868316b57abfc50bf159916358bc06ad44;p=utcp diff --git a/selftest.c b/selftest.c index 6edbc0d..3fb5c49 100644 --- a/selftest.c +++ b/selftest.c @@ -10,7 +10,7 @@ struct utcp *a; struct utcp *b; struct utcp_connection *c; -int do_recv(struct utcp_connection *x, void *data, size_t len) { +int do_recv(struct utcp_connection *x, const void *data, size_t len) { if(!len) { if(errno) fprintf(stderr, "%p Error: %s\n", x->utcp, strerror(errno)); @@ -43,7 +43,7 @@ void do_accept(struct utcp_connection *c, uint16_t port) { utcp_accept(c, do_recv, NULL); } -int do_send(struct utcp *utcp, void *data, size_t len) { +int do_send(struct utcp *utcp, const void *data, size_t len) { static int count = 0; if(++count > 1000) { fprintf(stderr, "Too many packets!\n");