diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-01-29 04:04:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:09:22 -0500 |
commit | ea2209e3db4dc1a6d455e01d5339b0b981c361b1 (patch) | |
tree | 33c00d3eeb1e45a6f0ce7874a50b6206b42a8fc0 /source4/lib | |
parent | b4055c9908b5e76f9799cc14db72cf3b3acc883f (diff) | |
download | samba-ea2209e3db4dc1a6d455e01d5339b0b981c361b1.tar.gz samba-ea2209e3db4dc1a6d455e01d5339b0b981c361b1.tar.bz2 samba-ea2209e3db4dc1a6d455e01d5339b0b981c361b1.zip |
r5092: Add a bit more const - moving it further into the LDB layer.
Andrew Bartlett
(This used to be commit ffad9b22be595279b247fa72d51145830fecbb06)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/common/ldb_msg.c | 4 | ||||
-rw-r--r-- | source4/lib/ldb/include/ldb.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c index 5ab2088744..3ef25e566f 100644 --- a/source4/lib/ldb/common/ldb_msg.c +++ b/source4/lib/ldb/common/ldb_msg.c @@ -202,11 +202,11 @@ int ldb_msg_add_value(struct ldb_context *ldb, add a string element to a message */ int ldb_msg_add_string(struct ldb_context *ldb, struct ldb_message *msg, - const char *attr_name, char *str) + const char *attr_name, const char *str) { struct ldb_val val; - val.data = str; + val.data = discard_const_p(char, str); val.length = strlen(str); return ldb_msg_add_value(ldb, msg, attr_name, &val); diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h index 0bb8105c44..310000b244 100644 --- a/source4/lib/ldb/include/ldb.h +++ b/source4/lib/ldb/include/ldb.h @@ -258,7 +258,7 @@ int ldb_msg_add_value(struct ldb_context *ldb, const char *attr_name, const struct ldb_val *val); int ldb_msg_add_string(struct ldb_context *ldb, struct ldb_message *msg, - const char *attr_name, char *str); + const char *attr_name, const char *str); /* compare two message elements - return 0 on match */ int ldb_msg_element_compare(struct ldb_message_element *el1, |