Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/libnv/dist nvpair_remove_nvlist_array: reve...
details: https://anonhg.NetBSD.org/src/rev/d7b30b75ef6f
branches: trunk
changeset: 448956:d7b30b75ef6f
user: rmind <rmind%NetBSD.org@localhost>
date: Fri Feb 15 22:49:24 2019 +0000
description:
nvpair_remove_nvlist_array: revert part of the rev 1.4 change (it was applied
by mistake because the libnv upsteam code on Github has deviated from FreeBSD,
i.e. it has a different nvlist_set_array_next() logic).
diffstat:
sys/external/bsd/libnv/dist/nvpair.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diffs (37 lines):
diff -r 2230da6f1d4d -r d7b30b75ef6f sys/external/bsd/libnv/dist/nvpair.c
--- a/sys/external/bsd/libnv/dist/nvpair.c Fri Feb 15 20:48:57 2019 +0000
+++ b/sys/external/bsd/libnv/dist/nvpair.c Fri Feb 15 22:49:24 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvpair.c,v 1.5 2019/02/12 12:52:49 rmind Exp $ */
+/* $NetBSD: nvpair.c,v 1.6 2019/02/15 22:49:24 rmind Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
@@ -36,7 +36,7 @@
#ifdef __FreeBSD__
__FBSDID("$FreeBSD: head/sys/contrib/libnv/nvpair.c 335382 2018-06-19 18:43:02Z lwhsu $");
#else
-__RCSID("$NetBSD: nvpair.c,v 1.5 2019/02/12 12:52:49 rmind Exp $");
+__RCSID("$NetBSD: nvpair.c,v 1.6 2019/02/15 22:49:24 rmind Exp $");
#endif
#include <sys/param.h>
@@ -251,16 +251,8 @@
nvlarray = __DECONST(nvlist_t **,
nvpair_get_nvlist_array(nvp, &count));
for (i = 0; i < count; i++) {
- nvlist_t *nvl;
- nvpair_t *nnvp;
-
- nvl = nvlarray[i];
- nnvp = nvlist_get_array_next_nvpair(nvl);
- if (nnvp != NULL) {
- nvpair_free_structure(nnvp);
- }
- nvlist_set_array_next(nvl, NULL);
- nvlist_set_parent(nvl, NULL);
+ nvlist_set_array_next(nvlarray[i], NULL);
+ nvlist_set_parent(nvlarray[i], NULL);
}
}
Home |
Main Index |
Thread Index |
Old Index