The Samba-Bugzilla – Attachment 3108 Details for
Bug 5178
Registry backend: Problems when editing with regedit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Properly check return values from ldb_*() functions.
patch-1 (text/plain), 1.46 KB, created by
Andrew Kroeger
on 2008-01-17 14:49:38 UTC
(
hide
)
Description:
Properly check return values from ldb_*() functions.
Filename:
MIME Type:
Creator:
Andrew Kroeger
Created:
2008-01-17 14:49:38 UTC
Size:
1.46 KB
patch
obsolete
>diff --git a/source/lib/registry/ldb.c b/source/lib/registry/ldb.c >index 259315c..af9d14d 100644 >--- a/source/lib/registry/ldb.c >+++ b/source/lib/registry/ldb.c >@@ -400,7 +400,7 @@ static WERROR ldb_add_key(TALLOC_CTX *mem_ctx, const struct hive_key *parent, > talloc_strdup(mem_ctx, classname)); > > ret = ldb_add(parentkd->ldb, msg); >- if (ret < 0) { >+ if (ret != LDB_SUCCESS) { > DEBUG(1, ("ldb_msg_add: %s\n", ldb_errstring(parentkd->ldb))); > return WERR_FOOBAR; > } >@@ -432,7 +432,7 @@ static WERROR ldb_del_key(const struct hive_key *key, const char *child) > > if (ret == LDB_ERR_NO_SUCH_OBJECT) { > return WERR_NOT_FOUND; >- } else if (ret < 0) { >+ } else if (ret != LDB_SUCCESS) { > DEBUG(1, ("ldb_del_key: %s\n", ldb_errstring(parentkd->ldb))); > return WERR_FOOBAR; > } >@@ -455,7 +455,7 @@ static WERROR ldb_del_value (struct hive_key *key, const char *child) > > if (ret == LDB_ERR_NO_SUCH_OBJECT) { > return WERR_NOT_FOUND; >- } else if (ret < 0) { >+ } else if (ret != LDB_SUCCESS) { > DEBUG(1, ("ldb_del_value: %s\n", ldb_errstring(kd->ldb))); > return WERR_FOOBAR; > } >@@ -478,9 +478,9 @@ static WERROR ldb_set_value(struct hive_key *parent, > ldb_dn_add_child_fmt(msg->dn, "value=%s", name); > > ret = ldb_add(kd->ldb, msg); >- if (ret < 0) { >+ if (ret != LDB_SUCCESS) { > ret = ldb_modify(kd->ldb, msg); >- if (ret < 0) { >+ if (ret != LDB_SUCCESS) { > DEBUG(1, ("ldb_msg_add: %s\n", ldb_errstring(kd->ldb))); > talloc_free(mem_ctx); > return WERR_FOOBAR;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5178
:
3090
|
3108
|
3109
|
3110
|
3111
|
3112
|
3113
|
3152
|
3400
|
3464
|
3466
|
3472
|
3473
|
3474
|
3480
|
3481
|
3497
|
3572