Explorar o código

dynamic debug: line queries failing due to uninitialized local variable

Settings of the form, 'line x module y +p', can fail arbitrarily due to an
uninitialized local variable. With this patch results are consistent, as
expected.

Signed-off-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
jbaron@akamai.com %!s(int64=12) %!d(string=hai) anos
pai
achega
bd8c154a62
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/dynamic_debug.c

+ 1 - 1
lib/dynamic_debug.c

@@ -309,7 +309,7 @@ static int ddebug_parse_query(char *words[], int nwords,
 			struct ddebug_query *query, const char *modname)
 {
 	unsigned int i;
-	int rc;
+	int rc = 0;
 
 	/* check we have an even number of words */
 	if (nwords % 2 != 0) {