]> git.meshlink.io Git - utcp/blobdiff - test.c
Pass buffers as const.
[utcp] / test.c
diff --git a/test.c b/test.c
index 956d1efd8d8fc5cee726b19b41ef55ba6a623888..474230818bb5f7e6c3fc5ffa586ec91cef7c7f15 100644 (file)
--- a/test.c
+++ b/test.c
@@ -17,7 +17,7 @@ struct utcp_connection *c;
 int dir = 3;
 bool running = true;
 
-int do_recv(struct utcp_connection *c, void *data, size_t len) {
+int do_recv(struct utcp_connection *c, const void *data, size_t len) {
        if(!data || !len) {
                if(errno)
                        fprintf(stderr, "Error: %s\n", strerror(errno));
@@ -35,7 +35,7 @@ void do_accept(struct utcp_connection *nc, uint16_t port) {
        c = nc;
 }
 
-int do_send(struct utcp *utcp, void *data, size_t len) {
+int do_send(struct utcp *utcp, const void *data, size_t len) {
        int s = *(int *)utcp->priv;
        return send(s, data, len, MSG_DONTWAIT);
 }