default:
/* These are set as normal. */
ecode = tdb_set_attribute(tdb, attr);
default:
/* These are set as normal. */
ecode = tdb_set_attribute(tdb, attr);
else {
ecode = tdb_new_database(tdb, seed, &hdr);
if (ecode == TDB_SUCCESS) {
else {
ecode = tdb_new_database(tdb, seed, &hdr);
if (ecode == TDB_SUCCESS) {
rlen = pread(tdb->file->fd, &hdr, sizeof(hdr), 0);
if (rlen == 0 && (open_flags & O_CREAT)) {
if (tdb->flags & TDB_VERSION1) {
rlen = pread(tdb->file->fd, &hdr, sizeof(hdr), 0);
if (rlen == 0 && (open_flags & O_CREAT)) {
if (tdb->flags & TDB_VERSION1) {
} else if (rlen < sizeof(hdr)
|| strcmp(hdr.magic_food, TDB_MAGIC_FOOD) != 0) {
if (is_tdb1(&tdb->tdb1.header, &hdr, rlen)) {
} else if (rlen < sizeof(hdr)
|| strcmp(hdr.magic_food, TDB_MAGIC_FOOD) != 0) {
if (is_tdb1(&tdb->tdb1.header, &hdr, rlen)) {
tdb->flags |= TDB_CONVERT;
else {
if (is_tdb1(&tdb->tdb1.header, &hdr, rlen)) {
tdb->flags |= TDB_CONVERT;
else {
if (is_tdb1(&tdb->tdb1.header, &hdr, rlen)) {