]> git.ozlabs.org Git - ccan/commit
tdb2: fix pread/pwrite error handling in fill and tdb_write.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 1 Mar 2011 12:49:18 +0000 (23:19 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 1 Mar 2011 12:49:18 +0000 (23:19 +1030)
commitb72a2ee12f033abd049111d90a2066b1151bc25d
tree9ecf98046425ccdb864b96945346140f9e640979
parenta39bf3aca1b60365efaf8b1eeb2b2c58b09ffab6
tdb2: fix pread/pwrite error handling in fill and tdb_write.

The "ret < n" was done as an unsigned comparison, so it didn't work as
expected when ret was negative.

Simplest fix is to do an equals comparison everywhere, which is also
slightly stricter.
ccan/tdb2/io.c