summaryrefslogtreecommitdiffstats
path: root/source/tdb
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-12-03 04:15:26 +0000
committerTim Potter <tpot@samba.org>2001-12-03 04:15:26 +0000
commita1cf70ab65058258e56ffcff5b28087b29425b1c (patch)
tree9717ab10baa8f45b0e3e8d6d03c363208671043c /source/tdb
parent2ce7f38fe96c6f5faf45d3c71a3c8d3386ea5107 (diff)
downloadsamba-a1cf70ab65058258e56ffcff5b28087b29425b1c.tar.gz
samba-a1cf70ab65058258e56ffcff5b28087b29425b1c.tar.xz
samba-a1cf70ab65058258e56ffcff5b28087b29425b1c.zip
Don't display any data if tdb_fetch() failed in the tdbtool "fetch"
command.
Diffstat (limited to 'source/tdb')
-rw-r--r--source/tdb/tdbtool.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/tdb/tdbtool.c b/source/tdb/tdbtool.c
index 4198d124189..31ecd17a0c1 100644
--- a/source/tdb/tdbtool.c
+++ b/source/tdb/tdbtool.c
@@ -253,7 +253,10 @@ static void show_tdb(void)
key.dsize = strlen(k)+1;
dbuf = tdb_fetch(tdb, key);
- if (!dbuf.dptr) terror("fetch failed");
+ if (!dbuf.dptr) {
+ terror("fetch failed");
+ return;
+ }
/* printf("%s : %*.*s\n", k, (int)dbuf.dsize, (int)dbuf.dsize, dbuf.dptr); */
print_rec(tdb, key, dbuf, NULL);
}