Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/lfs_cleanerd Use the same loop order for freeing as ...
details: https://anonhg.NetBSD.org/src/rev/e56f735b2ae2
branches: trunk
changeset: 778746:e56f735b2ae2
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Apr 12 10:30:17 2012 +0000
description:
Use the same loop order for freeing as for allocation. Simpler code and
easier to process for analyzers.
diffstat:
libexec/lfs_cleanerd/fdfs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 4527628d6907 -r e56f735b2ae2 libexec/lfs_cleanerd/fdfs.c
--- a/libexec/lfs_cleanerd/fdfs.c Thu Apr 12 01:05:31 2012 +0000
+++ b/libexec/lfs_cleanerd/fdfs.c Thu Apr 12 10:30:17 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdfs.c,v 1.8 2011/07/01 02:48:48 joerg Exp $ */
+/* $NetBSD: fdfs.c,v 1.9 2012/04/12 10:30:17 joerg Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -98,7 +98,7 @@
vp = (struct uvnode *) malloc(sizeof(*vp));
if (vp == NULL) {
if (fs->fd_bufp) {
- for (i = nseg - 1; i >= 0; i--)
+ for (i = 0; i < nseg; i++)
free(fs->fd_bufp[i].buf);
free(fs->fd_bufp);
}
Home |
Main Index |
Thread Index |
Old Index