net__write buf should be const.

This commit is contained in:
Roger Light 2021-01-03 20:52:45 +00:00
parent 8385769b86
commit c604cf8fd0
3 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ ssize_t net__read(struct mosquitto *mosq, void *buf, size_t count)
return 0;
}
ssize_t net__write(struct mosquitto *mosq, void *buf, size_t count)
ssize_t net__write(struct mosquitto *mosq, const void *buf, size_t count)
{
return 0;
}

View File

@ -995,7 +995,7 @@ ssize_t net__read(struct mosquitto *mosq, void *buf, size_t count)
#endif
}
ssize_t net__write(struct mosquitto *mosq, void *buf, size_t count)
ssize_t net__write(struct mosquitto *mosq, const void *buf, size_t count)
{
#ifdef WITH_TLS
int ret;

View File

@ -69,7 +69,7 @@ int net__socket_nonblock(mosq_sock_t *sock);
int net__socketpair(mosq_sock_t *sp1, mosq_sock_t *sp2);
ssize_t net__read(struct mosquitto *mosq, void *buf, size_t count);
ssize_t net__write(struct mosquitto *mosq, void *buf, size_t count);
ssize_t net__write(struct mosquitto *mosq, const void *buf, size_t count);
#ifdef WITH_TLS
void net__print_ssl_error(struct mosquitto *mosq);