[lxc-devel] [PATCH 6/6] coverity: Don't pass uninitialized var to write

Stéphane Graber stgraber at ubuntu.com
Fri Feb 14 21:33:09 UTC 2014


Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 src/tests/locktests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tests/locktests.c b/src/tests/locktests.c
index 2d04052..dd3393a 100644
--- a/src/tests/locktests.c
+++ b/src/tests/locktests.c
@@ -66,7 +66,7 @@ static void test_two_locks(void)
 		fprintf(stderr, "%d; failed to get lock\n", __LINE__);
 		exit(1);
 	}
-	if (write(p[1], &c, 1) < 0) {
+	if (write(p[1], "a", 1) < 0) {
 		perror("write");
 		exit(1);
 	}
-- 
1.9.rc1



More information about the lxc-devel mailing list