diff options
Diffstat (limited to 'lib/tdb')
-rw-r--r-- | lib/tdb/tools/tdbrestore.c | 2 | ||||
-rw-r--r-- | lib/tdb/tools/tdbtool.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/tdb/tools/tdbrestore.c b/lib/tdb/tools/tdbrestore.c index 95ee360647..1daac63db1 100644 --- a/lib/tdb/tools/tdbrestore.c +++ b/lib/tdb/tools/tdbrestore.c @@ -170,7 +170,7 @@ static int read_rec(FILE *f, TDB_CONTEXT *tdb, int *eof) || (swallow(f, "}\n", NULL) == -1)) { goto fail; } - if (tdb_store(tdb, key, data, TDB_INSERT) == -1) { + if (tdb_store(tdb, key, data, TDB_INSERT) != 0) { fprintf(stderr, "TDB error: %s\n", tdb_errorstr(tdb)); goto fail; } diff --git a/lib/tdb/tools/tdbtool.c b/lib/tdb/tools/tdbtool.c index cd17f79e32..99d4841cf3 100644 --- a/lib/tdb/tools/tdbtool.c +++ b/lib/tdb/tools/tdbtool.c @@ -257,7 +257,7 @@ static void insert_tdb(char *keyname, size_t keylen, char* data, size_t datalen) dbuf.dptr = (unsigned char *)data; dbuf.dsize = datalen; - if (tdb_store(tdb, key, dbuf, TDB_INSERT) == -1) { + if (tdb_store(tdb, key, dbuf, TDB_INSERT) != 0) { terror("insert failed"); } } @@ -284,7 +284,7 @@ static void store_tdb(char *keyname, size_t keylen, char* data, size_t datalen) printf("Storing key:\n"); print_rec(tdb, key, dbuf, NULL); - if (tdb_store(tdb, key, dbuf, TDB_REPLACE) == -1) { + if (tdb_store(tdb, key, dbuf, TDB_REPLACE) != 0) { terror("store failed"); } } @@ -363,7 +363,7 @@ static void move_rec(char *keyname, size_t keylen, char* tdbname) return; } - if ( tdb_store( dst_tdb, key, dbuf, TDB_REPLACE ) == -1 ) { + if (tdb_store( dst_tdb, key, dbuf, TDB_REPLACE ) != 0) { terror("failed to move record"); } else |