Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist don't use NULL for 0
details: https://anonhg.NetBSD.org/src/rev/ca53a804c075
branches: trunk
changeset: 753619:ca53a804c075
user: christos <christos%NetBSD.org@localhost>
date: Sat Apr 03 19:01:15 2010 +0000
description:
don't use NULL for 0
diffstat:
external/cddl/osnet/dist/lib/libzfs/common/libzfs_dataset.c | 2 +-
external/cddl/osnet/dist/uts/common/fs/zfs/arc.c | 18 ++++++------
2 files changed, 10 insertions(+), 10 deletions(-)
diffs (90 lines):
diff -r 5a65a54f5530 -r ca53a804c075 external/cddl/osnet/dist/lib/libzfs/common/libzfs_dataset.c
--- a/external/cddl/osnet/dist/lib/libzfs/common/libzfs_dataset.c Sat Apr 03 18:50:43 2010 +0000
+++ b/external/cddl/osnet/dist/lib/libzfs/common/libzfs_dataset.c Sat Apr 03 19:01:15 2010 +0000
@@ -3860,7 +3860,7 @@
if (cmd == ZFS_SMB_ACL_RENAME) {
if (nvlist_alloc(&nvlist, NV_UNIQUE_NAME, 0) != 0) {
(void) no_memory(hdl);
- return (NULL);
+ return 0;
}
}
diff -r 5a65a54f5530 -r ca53a804c075 external/cddl/osnet/dist/uts/common/fs/zfs/arc.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c Sat Apr 03 18:50:43 2010 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/arc.c Sat Apr 03 19:01:15 2010 +0000
@@ -1742,12 +1742,12 @@
if (mru_over > 0 && arc_mru_ghost->arcs_lsize[type] > 0) {
int64_t todelete =
MIN(arc_mru_ghost->arcs_lsize[type], mru_over);
- arc_evict_ghost(arc_mru_ghost, NULL, todelete);
+ arc_evict_ghost(arc_mru_ghost, 0, todelete);
} else if (arc_mfu_ghost->arcs_lsize[type] > 0) {
int64_t todelete = MIN(arc_mfu_ghost->arcs_lsize[type],
arc_mru_ghost->arcs_size +
arc_mfu_ghost->arcs_size - arc_c);
- arc_evict_ghost(arc_mfu_ghost, NULL, todelete);
+ arc_evict_ghost(arc_mfu_ghost, 0, todelete);
}
}
@@ -1843,13 +1843,13 @@
if (adjustment > 0 && arc_mru->arcs_lsize[ARC_BUFC_DATA] > 0) {
delta = MIN(arc_mru->arcs_lsize[ARC_BUFC_DATA], adjustment);
- (void) arc_evict(arc_mru, NULL, delta, FALSE, ARC_BUFC_DATA);
+ (void) arc_evict(arc_mru, 0, delta, FALSE, ARC_BUFC_DATA);
adjustment -= delta;
}
if (adjustment > 0 && arc_mru->arcs_lsize[ARC_BUFC_METADATA] > 0) {
delta = MIN(arc_mru->arcs_lsize[ARC_BUFC_METADATA], adjustment);
- (void) arc_evict(arc_mru, NULL, delta, FALSE,
+ (void) arc_evict(arc_mru, 0, delta, FALSE,
ARC_BUFC_METADATA);
}
@@ -1861,14 +1861,14 @@
if (adjustment > 0 && arc_mfu->arcs_lsize[ARC_BUFC_DATA] > 0) {
delta = MIN(adjustment, arc_mfu->arcs_lsize[ARC_BUFC_DATA]);
- (void) arc_evict(arc_mfu, NULL, delta, FALSE, ARC_BUFC_DATA);
+ (void) arc_evict(arc_mfu, 0, delta, FALSE, ARC_BUFC_DATA);
adjustment -= delta;
}
if (adjustment > 0 && arc_mfu->arcs_lsize[ARC_BUFC_METADATA] > 0) {
int64_t delta = MIN(adjustment,
arc_mfu->arcs_lsize[ARC_BUFC_METADATA]);
- (void) arc_evict(arc_mfu, NULL, delta, FALSE,
+ (void) arc_evict(arc_mfu, 0, delta, FALSE,
ARC_BUFC_METADATA);
}
@@ -1880,7 +1880,7 @@
if (adjustment > 0 && arc_mru_ghost->arcs_size > 0) {
delta = MIN(arc_mru_ghost->arcs_size, adjustment);
- arc_evict_ghost(arc_mru_ghost, NULL, delta);
+ arc_evict_ghost(arc_mru_ghost, 0, delta);
}
adjustment =
@@ -1888,7 +1888,7 @@
if (adjustment > 0 && arc_mfu_ghost->arcs_size > 0) {
delta = MIN(arc_mfu_ghost->arcs_size, adjustment);
- arc_evict_ghost(arc_mfu_ghost, NULL, delta);
+ arc_evict_ghost(arc_mfu_ghost, 0, delta);
}
}
@@ -2308,7 +2308,7 @@
state = (arc_mru->arcs_lsize[type] >= size &&
mfu_space > arc_mfu->arcs_size) ? arc_mru : arc_mfu;
}
- if ((buf->b_data = arc_evict(state, NULL, size, TRUE, type)) == NULL) {
+ if ((buf->b_data = arc_evict(state, 0, size, TRUE, type)) == NULL) {
if (type == ARC_BUFC_METADATA) {
buf->b_data = zio_buf_alloc(size);
arc_space_consume(size, ARC_SPACE_DATA);
Home |
Main Index |
Thread Index |
Old Index