[rtems commit] psxrdwrv/test.c: Clear iovec to ensure consistent results
Joel Sherrill
joel at rtems.org
Thu Sep 21 15:17:21 UTC 2017
Module: rtems
Branch: master
Commit: 714cb06f18ce2c0df265ada06363d71560f14a3e
Changeset: http://git.rtems.org/rtems/commit/?id=714cb06f18ce2c0df265ada06363d71560f14a3e
Author: Joel Sherrill <joel at rtems.org>
Date: Thu Sep 21 10:16:41 2017 -0500
psxrdwrv/test.c: Clear iovec to ensure consistent results
closes #3148.
---
testsuites/psxtests/psxrdwrv/test.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/testsuites/psxtests/psxrdwrv/test.c b/testsuites/psxtests/psxrdwrv/test.c
index d3adf14..d9582d8 100644
--- a/testsuites/psxtests/psxrdwrv/test.c
+++ b/testsuites/psxtests/psxrdwrv/test.c
@@ -194,6 +194,9 @@ int doErrorTest(void)
fd = fileno(fp);
fclose(fp);
+ /* clear out the vector to ensure it is valid */
+ memset(vec, 0, sizeof(vec));
+
/* writev -- bad file descriptor */
puts("writev bad file descriptor -- EBADF");
rc = writev(fd, vec, 4);
More information about the vc
mailing list