summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-10-12 12:04:50 +0200
committerMichael Adam <obnox@samba.org>2011-10-12 22:45:52 +0200
commit54649993b2ef3065738d572be3ca10a76cb06412 (patch)
tree738b7cb70934a4f6f2bff24b58c1871df8adc50f /source3
parent8a3aa56202758dac195a8d3bee446269863221ab (diff)
downloadsamba-54649993b2ef3065738d572be3ca10a76cb06412.tar.gz
samba-54649993b2ef3065738d572be3ca10a76cb06412.tar.bz2
samba-54649993b2ef3065738d572be3ca10a76cb06412.zip
s3:dbwrap_ctdb: improve the check for skipping the __db_sequence_number__ record in traverse
It did not compare the last charcter (usually '\0')
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/dbwrap/dbwrap_ctdb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index cdb3d73c55..4c5cd64da0 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -1361,8 +1361,7 @@ static int traverse_persistent_callback_read(TDB_CONTEXT *tdb, TDB_DATA kbuf, TD
* This is used for persistent transactions internally.
*/
if (kbuf.dsize == strlen(CTDB_DB_SEQNUM_KEY) + 1 &&
- strncmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY,
- strlen(CTDB_DB_SEQNUM_KEY)) == 0)
+ strcmp((const char*)kbuf.dptr, CTDB_DB_SEQNUM_KEY) == 0)
{
return 0;
}