diff options
author | Amit Shah <amit.shah@redhat.com> | 2009-10-30 11:24:30 +0530 |
---|---|---|
committer | Amit Shah <amit.shah@redhat.com> | 2009-11-04 18:18:24 +0530 |
commit | 4cfe40d925610d2b365fd25b7a32a60a36ce8dd1 (patch) | |
tree | 93f16bda51732f1884b7f980faa3381860abc6a1 | |
parent | 7574267c457289aceccdadac5d7927199dcee24e (diff) | |
download | test-virtserial-4cfe40d925610d2b365fd25b7a32a60a36ce8dd1.tar.gz test-virtserial-4cfe40d925610d2b365fd25b7a32a60a36ce8dd1.tar.xz test-virtserial-4cfe40d925610d2b365fd25b7a32a60a36ce8dd1.zip |
auto-test: memset buffer to 0 before writing to guest
even though this is not used, this is done
to suppress valgrind err messages
Signed-off-by: Amit Shah <amit.shah@redhat.com>
-rw-r--r-- | auto-virtserial.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/auto-virtserial.c b/auto-virtserial.c index 537bdbb..f242973 100644 --- a/auto-virtserial.c +++ b/auto-virtserial.c @@ -543,6 +543,7 @@ static int test_guest_throttle(int nr) if (!buf) error(ENOMEM, ENOMEM, "%s\n", __func__); + memset(buf, 0, BUF_LENGTH); host_connect_chardev(nr); pollfd[0].fd = chardevs[nr].sock; @@ -621,6 +622,7 @@ static int test_guest_caching(int nr) if (!buf) error(ENOMEM, ENOMEM, "%s\n", __func__); + memset(buf, 0, BUF_LENGTH); ret = write(chardevs[nr].sock, buf, BUF_LENGTH); if (ret == -1) error(errno, errno, "%s: write", __func__); |