[SCM] Samba Shared Repository - branch master updated -
a255f9ce713b29552722ec73e4038226959e1c8e
Stefan Metzmacher
metze at samba.org
Mon Dec 29 08:05:33 GMT 2008
The branch, master has been updated
via a255f9ce713b29552722ec73e4038226959e1c8e (commit)
from b719595fd6fd8606b4a5eefa2b0cc24da503a44c (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit a255f9ce713b29552722ec73e4038226959e1c8e
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Dec 17 17:16:50 2008 +0100
s3:dbwrap: fix dbwrap_store_uint32() to match dbwrap_store_int32()
All callers expect 0 an success and -1 on error.
metze
-----------------------------------------------------------------------
Summary of changes:
source3/include/proto.h | 2 +-
source3/lib/dbwrap_util.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/include/proto.h b/source3/include/proto.h
index cffb8f7..5a3776b 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -441,7 +441,7 @@ int32_t dbwrap_fetch_int32(struct db_context *db, const char *keystr);
int dbwrap_store_int32(struct db_context *db, const char *keystr, int32_t v);
bool dbwrap_fetch_uint32(struct db_context *db, const char *keystr,
uint32_t *val);
-bool dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v);
+int dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v);
uint32_t dbwrap_change_uint32_atomic(struct db_context *db, const char *keystr,
uint32_t *oldval, uint32_t change_val);
int32 dbwrap_change_int32_atomic(struct db_context *db, const char *keystr,
diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c
index ddc6131..3be3a49 100644
--- a/source3/lib/dbwrap_util.c
+++ b/source3/lib/dbwrap_util.c
@@ -78,7 +78,7 @@ bool dbwrap_fetch_uint32(struct db_context *db, const char *keystr,
return true;
}
-bool dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v)
+int dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v)
{
struct db_record *rec;
uint32 v_store;
@@ -86,7 +86,7 @@ bool dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v)
rec = db->fetch_locked(db, NULL, string_term_tdb_data(keystr));
if (rec == NULL) {
- return false;
+ return -1;
}
SIVAL(&v_store, 0, v);
--
Samba Shared Repository
More information about the samba-cvs
mailing list