From 230f387312524eb55a79f85fbee08953dbc1f8a5 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Sat, 17 Oct 2009 22:31:34 +0200 Subject: s4:nbt_server/wins/winsdb - Fix "const" warning --- source4/nbt_server/wins/winsdb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source4/nbt_server') diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c index 56ba146be1..fb3dcbf906 100644 --- a/source4/nbt_server/wins/winsdb.c +++ b/source4/nbt_server/wins/winsdb.c @@ -319,7 +319,6 @@ failed: static int ldb_msg_add_winsdb_addr(struct ldb_message *msg, struct winsdb_record *rec, const char *attr_name, struct winsdb_addr *addr) { - struct ldb_val val; const char *str; if (rec->is_static) { @@ -336,10 +335,7 @@ static int ldb_msg_add_winsdb_addr(struct ldb_message *msg, struct winsdb_record if (!str) return LDB_ERR_OPERATIONS_ERROR; } - val.data = discard_const_p(uint8_t, str); - val.length = strlen(str); - - return ldb_msg_add_value(msg, attr_name, &val, NULL); + return ldb_msg_add_string(msg, attr_name, str); } struct winsdb_addr **winsdb_addr_list_make(TALLOC_CTX *mem_ctx) -- cgit