summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-27 20:19:34 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-11-27 21:50:42 +0100
commit989d8803f28826e6541667127abad801c4fa4566 (patch)
tree820efae1e2a7b617481aff455cc5ea64f20c42ff /lib
parenteaac27738145c60133163bff763412d96bc72cbb (diff)
downloadsamba-989d8803f28826e6541667127abad801c4fa4566.tar.gz
samba-989d8803f28826e6541667127abad801c4fa4566.tar.bz2
samba-989d8803f28826e6541667127abad801c4fa4566.zip
tdb:common/open.c - use "discard_const_p" for certain "tdb->name" assignments
In order to suppress compiler warnings.
Diffstat (limited to 'lib')
-rw-r--r--lib/tdb/common/open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tdb/common/open.c b/lib/tdb/common/open.c
index ce8e9f55ad..ec45689ffc 100644
--- a/lib/tdb/common/open.c
+++ b/lib/tdb/common/open.c
@@ -202,7 +202,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td
}
if (name == NULL) {
- tdb->name = "__NULL__";
+ tdb->name = discard_const_p(char, "__NULL__");
TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: called with name == NULL\n"));
tdb->name = NULL;
errno = EINVAL;
@@ -215,7 +215,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int td
* set the name as the given string, so that tdb_name() will
* work in case of an error.
*/
- tdb->name = name;
+ tdb->name = discard_const_p(char, name);
TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't strdup(%s)\n",
name));
tdb->name = NULL;