Commit 49ae22ba by Carlos Martín Nieto

stream: constify the write buffer

parent 1b75c29e
......@@ -32,7 +32,7 @@ typedef struct git_stream {
int (*connect)(struct git_stream *);
int (*certificate)(git_cert **, struct git_stream *);
ssize_t (*read)(struct git_stream *, void *, size_t);
ssize_t (*write)(struct git_stream *, void *, size_t, int);
ssize_t (*write)(struct git_stream *, const char *, size_t, int);
int (*close)(struct git_stream *);
void (*free)(struct git_stream *);
} git_stream;
......
......@@ -277,7 +277,7 @@ int openssl_certificate(git_cert **out, git_stream *stream)
return 0;
}
ssize_t openssl_write(git_stream *stream, void *data, size_t len, int flags)
ssize_t openssl_write(git_stream *stream, const char *data, size_t len, int flags)
{
openssl_stream *st = (openssl_stream *) stream;
int ret;
......
......@@ -131,7 +131,7 @@ int socket_connect(git_stream *stream)
return 0;
}
ssize_t socket_write(git_stream *stream, void *data, size_t len, int flags)
ssize_t socket_write(git_stream *stream, const char *data, size_t len, int flags)
{
ssize_t ret;
size_t off = 0;
......
......@@ -30,7 +30,7 @@ GIT_INLINE(ssize_t) git_stream_read(git_stream *st, void *data, size_t len)
return st->read(st, data, len);
}
GIT_INLINE(ssize_t) git_stream_write(git_stream *st, void *data, size_t len, int flags)
GIT_INLINE(ssize_t) git_stream_write(git_stream *st, const char *data, size_t len, int flags)
{
return st->write(st, data, len, flags);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment