Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ddb db_command - make setting have_addr more clear.



details:   https://anonhg.NetBSD.org/src/rev/061aa445e02c
branches:  trunk
changeset: 464236:061aa445e02c
user:      uwe <uwe%NetBSD.org@localhost>
date:      Sun Sep 29 02:42:12 2019 +0000

description:
db_command - make setting have_addr more clear.
Don't set it to false that it's already initialized to.

diffstat:

 sys/ddb/db_command.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (50 lines):

diff -r fbc6f4c53c16 -r 061aa445e02c sys/ddb/db_command.c
--- a/sys/ddb/db_command.c      Sun Sep 29 02:35:39 2019 +0000
+++ b/sys/ddb/db_command.c      Sun Sep 29 02:42:12 2019 +0000
@@ -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 @@
        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 @@
                        }
                } else
                        count = last_count;
-               have_addr = false;
                modif[0] = '\0';
                db_skip_to_eol();
 
@@ -898,7 +898,6 @@
                                have_addr = true;
                        } else {
                                addr = (db_expr_t) db_dot;
-                               have_addr = false;
                        }
 
                        t = db_read_token();



Home | Main Index | Thread Index | Old Index