Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/iscsi Save space by making ack flag booleans.
details: https://anonhg.NetBSD.org/src/rev/94ac334da967
branches: trunk
changeset: 338576:94ac334da967
user: joerg <joerg%NetBSD.org@localhost>
date: Sat May 30 18:12:09 2015 +0000
description:
Save space by making ack flag booleans.
diffstat:
sys/dev/iscsi/iscsi_globals.h | 4 ++--
sys/dev/iscsi/iscsi_utils.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 935290274cd8 -r 94ac334da967 sys/dev/iscsi/iscsi_globals.h
--- a/sys/dev/iscsi/iscsi_globals.h Sat May 30 18:09:31 2015 +0000
+++ b/sys/dev/iscsi/iscsi_globals.h Sat May 30 18:12:09 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iscsi_globals.h,v 1.11 2015/05/30 18:09:31 joerg Exp $ */
+/* $NetBSD: iscsi_globals.h,v 1.12 2015/05/30 18:12:09 joerg Exp $ */
/*-
* Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -200,7 +200,7 @@
int top; /* top of buffer (newest element) */
int bottom; /* bottom of buffer (oldest element) */
uint32_t sernum[SERNUM_BUFFER_LENGTH]; /* the serial numbers */
- int ack[SERNUM_BUFFER_LENGTH]; /* acknowledged? */
+ bool ack[SERNUM_BUFFER_LENGTH]; /* acknowledged? */
} sernum_buffer_t;
diff -r 935290274cd8 -r 94ac334da967 sys/dev/iscsi/iscsi_utils.c
--- a/sys/dev/iscsi/iscsi_utils.c Sat May 30 18:09:31 2015 +0000
+++ b/sys/dev/iscsi/iscsi_utils.c Sat May 30 18:12:09 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iscsi_utils.c,v 1.7 2015/05/30 18:00:09 joerg Exp $ */
+/* $NetBSD: iscsi_utils.c,v 1.8 2015/05/30 18:12:09 joerg Exp $ */
/*-
* Copyright (c) 2004,2005,2006,2008 The NetBSD Foundation, Inc.
@@ -600,7 +600,7 @@
for (i = 0; i < diff; i++) {
buff->sernum[t] = n++;
- buff->ack[t] = 0;
+ buff->ack[t] = false;
t = (t + 1) % SERNUM_BUFFER_LENGTH;
if (t == b) {
DEB(1, ("AddSernum: Buffer Full! num %d, diff %d\n", num, diff));
@@ -648,7 +648,7 @@
if (b == buff->bottom)
buff->bottom = (b + 1) % SERNUM_BUFFER_LENGTH;
else
- buff->ack[b] = 1;
+ buff->ack[b] = true;
}
for (b = buff->bottom, num = buff->sernum[b] - 1;
Home |
Main Index |
Thread Index |
Old Index