From 8cf07dcbe7691dbe4f47563058659dba6ef66b05 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 19 May 2009 18:51:34 +0200 Subject: Fix output of uninitialized strings Commit ffad4116b96e29e0fbe892806f97c0a6c903d30d removed the "scratch buffer" from check_params, but didn't care for the error messages which actually included this string to tell the user which option was wrong. Now this string is uninitialized, so this patch removes it from the message. This means that the user is only told the whole parameter string and has to pick the wrong option by himself as the callers of check_params can't know this value any more. An alternative approach would be to revert that commit and do whatever is needed to fix the original problem without changing check_params. Signed-off-by: Kevin Wolf Signed-off-by: Anthony Liguori --- vl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index 2c1f0e0..b1216c0 100644 --- a/vl.c +++ b/vl.c @@ -2227,8 +2227,7 @@ int drive_init(struct drive_opt *arg, int snapshot, void *opaque) NULL }; if (check_params(params, str) < 0) { - fprintf(stderr, "qemu: unknown parameter '%s' in '%s'\n", - buf, str); + fprintf(stderr, "qemu: unknown parameter in '%s'\n", str); return -1; } -- cgit v1.1