diff options
| author | uwe <uwe@NetBSD.org> | 2019-09-29 02:42:12 +0000 |
|---|---|---|
| committer | uwe <uwe@NetBSD.org> | 2019-09-29 02:42:12 +0000 |
| commit | cde1bb20c7e015ff466988d2636ab5f3f7671cb5 (patch) | |
| tree | be98d4c5c62b60d29ef59ea7440265f490ef4eb9 /sys/ddb/db_command.c | |
| parent | 05d894b71230bcd956762b309030cb3dc6ea42d4 (diff) | |
db_command - make setting have_addr more clear.
Don't set it to false that it's already initialized to.
Diffstat (limited to 'sys/ddb/db_command.c')
| -rw-r--r-- | sys/ddb/db_command.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 133fa131a23..197f7ff5b19 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $NetBSD: db_command.c,v 1.162 2019/09/29 02:35:39 uwe Exp $ */ +/* $NetBSD: db_command.c,v 1.163 2019/09/29 02:42:12 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.162 2019/09/29 02:35:39 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.163 2019/09/29 02:42:12 uwe Exp $"); #ifdef _KERNEL_OPT #include "opt_aio.h" @@ -823,12 +823,13 @@ db_command(const struct db_command **last_cmdp) const struct db_command *command; static db_expr_t last_count = 0; db_expr_t addr, count; + bool have_addr; char modif[TOK_STRING_SIZE]; - + int t; - bool have_addr = false; command = NULL; + have_addr = false; count = -1; t = db_read_token(); @@ -851,7 +852,6 @@ db_command(const struct db_command **last_cmdp) } } else count = last_count; - have_addr = false; modif[0] = '\0'; db_skip_to_eol(); @@ -898,7 +898,6 @@ db_command(const struct db_command **last_cmdp) have_addr = true; } else { addr = (db_expr_t) db_dot; - have_addr = false; } t = db_read_token(); |
