INN commit: trunk/lib (dbz.c)
INN Commit
Russ_Allbery at isc.org
Sat Feb 10 22:32:15 UTC 2007
Date: Saturday, February 10, 2007 @ 14:32:15
Author: eagle
Revision: 7604
Use a temporary variable to be more careful about signed to unsigned
comparison with offsets.
Modified:
trunk/lib/dbz.c
-------+
dbz.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Modified: dbz.c
===================================================================
--- dbz.c 2007-02-10 22:27:46 UTC (rev 7603)
+++ dbz.c 2007-02-10 22:32:15 UTC (rev 7604)
@@ -1304,13 +1304,15 @@
putcore(hash_table *tab)
{
size_t size;
+ ssize_t result;
if (tab->incore == INCORE_MEM) {
if(options.writethrough)
return true;
nonblocking(tab->fd, false);
size = tab->reclen * conf.tsize;
- if (xpwrite(tab->fd, tab->core, size, 0) != size) {
+ result = xpwrite(tab->fd, tab->core, size, 0);
+ if (result < 0 || (size_t) result != size) {
nonblocking(tab->fd, options.nonblock);
return false;
}
More information about the inn-committers
mailing list