tdb2: clean up logging
[ccan] / ccan / tdb2 / hash.c
index 69df151e98e8100593d0a5582b8cfd84c09dac05..a8a701ec507d1ab13de7551a96244389c38742e3 100644 (file)
@@ -561,10 +561,11 @@ int next_in_hash(struct tdb_context *tdb, int ltype,
                                return -1;
                        }
                        if (rec_magic(&rec) != TDB_MAGIC) {
-                               tdb->log(tdb, TDB_DEBUG_FATAL, tdb->log_priv,
-                                        "next_in_hash:"
-                                        " corrupt record at %llu\n",
-                                        (long long)off);
+                               tdb_logerr(tdb, TDB_ERR_CORRUPT,
+                                          TDB_DEBUG_FATAL,
+                                          "next_in_hash:"
+                                          " corrupt record at %llu",
+                                          (long long)off);
                                return -1;
                        }