summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-02-09 19:51:44 +0000
committerLuke Leighton <lkcl@samba.org>1999-02-09 19:51:44 +0000
commit748f296a76a76d38525ad35df6658811cae60222 (patch)
tree977f07b580b89f7f8494847e2fad36946679d51e /source3/rpc_parse
parent3b12477f34a4311235c7c0b2e9a9cdc9f5a4f0e9 (diff)
downloadsamba-748f296a76a76d38525ad35df6658811cae60222.tar.gz
samba-748f296a76a76d38525ad35df6658811cae60222.tar.bz2
samba-748f296a76a76d38525ad35df6658811cae60222.zip
removal of the use of unistrn2 function: replace it with unistr2_to_str
which is more appropriate. (This used to be commit ac72fe1ab3d10f64a5945ccbd4ed3817e30f9f7b)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_lsa.c5
-rw-r--r--source3/rpc_parse/parse_misc.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index 239c0847af..cb88e71536 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -688,9 +688,10 @@ void make_q_lookup_names(LSA_Q_LOOKUP_NAMES *q_l, POLICY_HND *hnd,
for (i = 0; i < num_names; i++)
{
- int len = strlen(names[i]);
+ const char* name = names[i];
+ int len = strlen(name);
make_uni_hdr(&q_l->hdr_name[i], len, len, len != 0);
- make_unistr2(&q_l->uni_name[i], names[i], len);
+ make_unistr2(&q_l->uni_name[i], name, len);
}
q_l->num_trans_entries = 0;
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index e1a7d3c6a5..bf3bba1249 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -563,7 +563,7 @@ void smb_io_string2(char *desc, STRING2 *str2, uint32 buffer, prs_struct *ps, i
/*******************************************************************
creates a UNISTR2 structure.
********************************************************************/
-void make_unistr2(UNISTR2 *str, char *buf, int len)
+void make_unistr2(UNISTR2 *str, const char *buf, int len)
{
ZERO_STRUCTP(str);
@@ -573,7 +573,7 @@ void make_unistr2(UNISTR2 *str, char *buf, int len)
str->uni_str_len = len;
/* store the string (null-terminated 8 bit chars into 16 bit chars) */
- struni2((char *)(str->buffer), buf);
+ struni2((char*)(str->buffer), buf);
}
/*******************************************************************