Module Name:    src
Committed By:   uwe
Date:           Sun Sep 29 02:35:39 UTC 2019

Modified Files:
        src/sys/ddb: db_command.c

Log Message:
db_command - make sure count is always initialized.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/ddb/db_command.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ddb/db_command.c
diff -u src/sys/ddb/db_command.c:1.161 src/sys/ddb/db_command.c:1.162
--- src/sys/ddb/db_command.c:1.161	Sun Sep 22 12:57:34 2019
+++ src/sys/ddb/db_command.c	Sun Sep 29 02:35:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.161 2019/09/22 12:57:34 mrg Exp $	*/
+/*	$NetBSD: db_command.c,v 1.162 2019/09/29 02:35:39 uwe Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.161 2019/09/22 12:57:34 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.162 2019/09/29 02:35:39 uwe Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -829,7 +829,8 @@ db_command(const struct db_command **las
 	bool		have_addr = false;
 
 	command = NULL;
-	
+	count = -1;
+
 	t = db_read_token();
 	if ((t == tEOL) || (t == tCOMMA)) {
 		/*
@@ -909,7 +910,6 @@ db_command(const struct db_command **las
 				}
 			} else {
 				db_unread_token(t);
-				count = -1;
 			}
 			if ((command->flag & CS_MORE) == 0) {
 				db_skip_to_eol();

Reply via email to