Merge pull request #959 from richardg867/master

Fix SLiRP warnings
This commit is contained in:
Miran Grča
2020-08-08 06:17:25 +02:00
committed by GitHub

View File

@@ -167,10 +167,10 @@ size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np)
*/
int soread(struct socket *so)
{
int n, nn;
int n = 0, nn;
size_t buf_len;
struct sbuf *sb = &so->so_snd;
struct iovec iov[2];
struct iovec iov[2] = {{0, 0}, {0, 0}};
DEBUG_CALL("soread");
DEBUG_ARG("so = %p", so);
@@ -248,7 +248,7 @@ int soreadbuf(struct socket *so, const char *buf, int size)
{
int n, nn, copy = size;
struct sbuf *sb = &so->so_snd;
struct iovec iov[2];
struct iovec iov[2] = {{0, 0}, {0, 0}};
DEBUG_CALL("soreadbuf");
DEBUG_ARG("so = %p", so);
@@ -396,7 +396,7 @@ int sowrite(struct socket *so)
int n, nn;
struct sbuf *sb = &so->so_rcv;
int len = sb->sb_cc;
struct iovec iov[2];
struct iovec iov[2] = {{0, 0}, {0, 0}};
DEBUG_CALL("sowrite");
DEBUG_ARG("so = %p", so);