diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-11-27 20:19:34 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-11-27 21:50:42 +0100 |
commit | 989d8803f28826e6541667127abad801c4fa4566 (patch) | |
tree | 820efae1e2a7b617481aff455cc5ea64f20c42ff /lib/tdb | |
parent | eaac27738145c60133163bff763412d96bc72cbb (diff) | |
download | samba-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/tdb')
-rw-r--r-- | lib/tdb/common/open.c | 4 |
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; |