Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sysinst Make sure to completely initialize dynamic ...
details: https://anonhg.NetBSD.org/src/rev/44c43485a5d9
branches: trunk
changeset: 458862:44c43485a5d9
user: martin <martin%NetBSD.org@localhost>
date: Tue Aug 13 17:57:49 2019 +0000
description:
Make sure to completely initialize dynamic menu entries.
diffstat:
usr.sbin/sysinst/partman.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diffs (39 lines):
diff -r 2546881b74a1 -r 44c43485a5d9 usr.sbin/sysinst/partman.c
--- a/usr.sbin/sysinst/partman.c Tue Aug 13 17:24:25 2019 +0000
+++ b/usr.sbin/sysinst/partman.c Tue Aug 13 17:57:49 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: partman.c,v 1.41 2019/07/25 19:01:08 martin Exp $ */
+/* $NetBSD: partman.c,v 1.42 2019/08/13 17:57:49 martin Exp $ */
/*
* Copyright 2012 Eugene Lozovoy
@@ -2802,8 +2802,7 @@
return -1;
SLIST_FOREACH(pm_i, &pm_head, l) {
- m->opts[i].opt_name = NULL;
- m->opts[i].opt_exp_name = NULL;
+ memset(&m->opts[i], 0, sizeof m->opts[i]);
m->opts[i].opt_action = pm_submenu;
((struct part_entry *)arg)[i].dev_ptr = pm_i;
((struct part_entry *)arg)[i].id = NO_PART;
@@ -2837,8 +2836,7 @@
if (i >= MAX_ENTRIES)
break;
i++;
- m->opts[i].opt_name = NULL;
- m->opts[i].opt_exp_name = NULL;
+ memset(&m->opts[i], 0, sizeof m->opts[i]);
m->opts[i].opt_action = pm_submenu;
((struct part_entry *)arg)[i].parts =
pm_i->parts;
@@ -2860,8 +2858,7 @@
if (i >= MAX_ENTRIES)
break;
i++;
- m->opts[i].opt_name = NULL;
- m->opts[i].opt_exp_name = NULL;
+ memset(&m->opts[i], 0, sizeof m->opts[i]);
m->opts[i].opt_action = pm_submenu;
((struct part_entry *)arg)[i].parts = secondary;
((struct part_entry *)arg)[i].dev_ptr = pm_i;
Home |
Main Index |
Thread Index |
Old Index