Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix previous slightly differently.
details: https://anonhg.NetBSD.org/src/rev/ba894256007f
branches: trunk
changeset: 792489:ba894256007f
user: dsl <dsl%NetBSD.org@localhost>
date: Sun Jan 05 09:13:18 2014 +0000
description:
Fix previous slightly differently.
No need to have an extra variable and to write to the list head.
diffstat:
sys/kern/core_elf32.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (37 lines):
diff -r 43bf5b72b097 -r ba894256007f sys/kern/core_elf32.c
--- a/sys/kern/core_elf32.c Sun Jan 05 06:56:22 2014 +0000
+++ b/sys/kern/core_elf32.c Sun Jan 05 09:13:18 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: core_elf32.c,v 1.43 2014/01/05 00:53:53 mrg Exp $ */
+/* $NetBSD: core_elf32.c,v 1.44 2014/01/05 09:13:18 dsl Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.43 2014/01/05 00:53:53 mrg Exp $");
+__KERNEL_RCSID(1, "$NetBSD: core_elf32.c,v 1.44 2014/01/05 09:13:18 dsl Exp $");
#ifdef _KERNEL_OPT
#include "opt_coredump.h"
@@ -116,7 +116,6 @@
struct note_state ns;
struct note_buf *nb;
- struct note_buf *nb_next;
psections = NULL;
@@ -257,8 +256,8 @@
out:
if (psections)
kmem_free(psections, psectionssize);
- for (; (nb = ns.ns_first) != NULL; ns.ns_first = nb_next) {
- nb_next = nb->nb_next;
+ while ((nb = ns.ns_first) != NULL) {
+ ns.ns_first = nb->nb_next;
kmem_free(nb, sizeof *nb);
}
return (error);
Home |
Main Index |
Thread Index |
Old Index