Make inbuf and outbuf len check params const

This commit is contained in:
Mike Perry 2021-07-20 18:30:23 +00:00 committed by David Goulet
parent a0368b3759
commit 5c3021be85
2 changed files with 4 additions and 4 deletions

View File

@ -250,13 +250,13 @@ CONST_TO_LISTENER_CONN(const connection_t *c)
}
size_t
connection_get_inbuf_len(connection_t *conn)
connection_get_inbuf_len(const connection_t *conn)
{
return conn->inbuf ? buf_datalen(conn->inbuf) : 0;
}
size_t
connection_get_outbuf_len(connection_t *conn)
connection_get_outbuf_len(const connection_t *conn)
{
return conn->outbuf ? buf_datalen(conn->outbuf) : 0;
}

View File

@ -274,8 +274,8 @@ void connection_buf_add_compress(const char *string, size_t len,
struct dir_connection_t *conn, int done);
void connection_buf_add_buf(struct connection_t *conn, struct buf_t *buf);
size_t connection_get_inbuf_len(struct connection_t *conn);
size_t connection_get_outbuf_len(struct connection_t *conn);
size_t connection_get_inbuf_len(const struct connection_t *conn);
size_t connection_get_outbuf_len(const struct connection_t *conn);
struct connection_t *connection_get_by_global_id(uint64_t id);
struct connection_t *connection_get_by_type(int type);