summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-09-27 16:06:48 +0200
committerMichael Adam <obnox@samba.org>2011-09-28 16:54:58 +0200
commit417c16e4e6d6a51171f8d2982e8bf9c4d602e058 (patch)
tree945b4cff464c977a2a63eb79b445e0ff30c46885 /source3
parentf4fa725b952a6010a0b585f3b303e2e4e4179406 (diff)
downloadsamba-417c16e4e6d6a51171f8d2982e8bf9c4d602e058.tar.gz
samba-417c16e4e6d6a51171f8d2982e8bf9c4d602e058.tar.bz2
samba-417c16e4e6d6a51171f8d2982e8bf9c4d602e058.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') Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Wed Sep 28 16:54:59 CEST 2011 on sn-devel-104
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 d9fb48950c..84d7b2fc2f 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -1267,8 +1267,7 @@ static int traverse_persistent_callback(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DAT
* 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))
{
goto done;
}