summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2015-09-01 05:26:10 +0000
committerjsg <jsg@openbsd.org>2015-09-01 05:26:10 +0000
commit9d84d697bf7048fe630b728311770b0a880f2deb (patch)
tree1eb496c8bdf0a67030d3d9482382c2a1c43b61ac
parentmissing splx (diff)
downloadwireguard-openbsd-9d84d697bf7048fe630b728311770b0a880f2deb.tar.xz
wireguard-openbsd-9d84d697bf7048fe630b728311770b0a880f2deb.zip
initialise the width var in db_struct_offset_cmd()
ok miod@ deraadt@
-rw-r--r--sys/ddb/db_struct.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/ddb/db_struct.c b/sys/ddb/db_struct.c
index 98ecbfe9fe4..32ac575030d 100644
--- a/sys/ddb/db_struct.c
+++ b/sys/ddb/db_struct.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_struct.c,v 1.3 2013/10/19 21:02:50 guenther Exp $ */
+/* $OpenBSD: db_struct.c,v 1.4 2015/09/01 05:26:10 jsg Exp $ */
/*
* Copyright (c) 2009 Miodrag Vallat.
@@ -203,6 +203,7 @@ db_struct_offset_cmd(db_expr_t addr, int have_addr, db_expr_t count,
break;
if (oidx == NOFFS) {
+ width = 0;
db_format(tmpfmt, sizeof tmpfmt, (long)offset,
DB_FORMAT_N, 0, width);
db_printf("no known structure element at offset %-*s\n",