diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 08:13:26 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 08:13:26 +0930 |
commit | 1cb92ea9cf3efcc5f4295b7aeb8ddd10e174127c (patch) | |
tree | 01c94f07d81359ecc1d452864bfcbc8ab4d2908a /lib/tdb2/test | |
parent | 01b2214a1893db5071addf1fdf17e9ac06ed63a0 (diff) | |
download | samba-1cb92ea9cf3efcc5f4295b7aeb8ddd10e174127c.tar.gz samba-1cb92ea9cf3efcc5f4295b7aeb8ddd10e174127c.tar.bz2 samba-1cb92ea9cf3efcc5f4295b7aeb8ddd10e174127c.zip |
tdb2: don't continue if tdb1_find fails.
The TDB1 code's tdb1_find() returns 0 on error; the callers should
not assume that the error means that the entry wasn't found, but use
last_error to determine it.
This was found by looking at how long the failure path testing for
test/run-10-simple-store.c was taking under valgrind, ie:
valgrind -q ./run-10-simple-store --show-slowest
This change dropped the time for that test from 53 seconds to 19
seconds.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 1be090a2d749713cfd0c4584cafb97bffd716189)
Diffstat (limited to 'lib/tdb2/test')
0 files changed, 0 insertions, 0 deletions