diff options
author | Michael Adam <obnox@samba.org> | 2011-08-24 13:15:48 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-10-11 14:17:56 +0200 |
commit | e39cd86381404f451668967be05c7cfbb1649bbd (patch) | |
tree | e79e441627545b1c4b242b6564792b3e83e6b2fc /source3 | |
parent | 0e28448a780cf231ae38fe03a85cf6e1ea9dded0 (diff) | |
download | samba-e39cd86381404f451668967be05c7cfbb1649bbd.tar.gz samba-e39cd86381404f451668967be05c7cfbb1649bbd.tar.bz2 samba-e39cd86381404f451668967be05c7cfbb1649bbd.zip |
s3:dbwrap: use dbwrap_fetch_bystring() in dbwrap_fetch_[u]int32()
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/dbwrap/dbwrap_util.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/lib/dbwrap/dbwrap_util.c b/source3/lib/dbwrap/dbwrap_util.c index a4f249270d..70df67a230 100644 --- a/source3/lib/dbwrap/dbwrap_util.c +++ b/source3/lib/dbwrap/dbwrap_util.c @@ -30,8 +30,10 @@ int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr) { TDB_DATA dbuf; int32 ret; + NTSTATUS status; - if (db->fetch(db, NULL, string_term_tdb_data(keystr), &dbuf) != 0) { + status = dbwrap_fetch_bystring(db, NULL, keystr, &dbuf); + if (!NT_STATUS_IS_OK(status)) { return -1; } @@ -69,8 +71,10 @@ bool dbwrap_fetch_uint32(struct db_context *db, const char *keystr, uint32_t *val) { TDB_DATA dbuf; + NTSTATUS status; - if (db->fetch(db, NULL, string_term_tdb_data(keystr), &dbuf) != 0) { + status = dbwrap_fetch_bystring(db, NULL, keystr, &dbuf); + if (!NT_STATUS_IS_OK(status)) { return false; } |