summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_samr.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-16 05:07:07 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-16 05:07:07 +0000
commit4d48e84ffa6ec206f4bd6872e1f642f5cebc37f3 (patch)
treed741386145e6a55eb1a6bcc367165830bd53367a /source4/librpc/ndr/ndr_samr.c
parentb5fccdd9ee4f18ff77e488c0beb85410b554ac78 (diff)
downloadsamba-4d48e84ffa6ec206f4bd6872e1f642f5cebc37f3.tar.gz
samba-4d48e84ffa6ec206f4bd6872e1f642f5cebc37f3.tar.bz2
samba-4d48e84ffa6ec206f4bd6872e1f642f5cebc37f3.zip
slightly more efficient strlen setting in lsa and samr strings (calls
strlen_m() once, not twice) (This used to be commit 468c2dc632703e6956428fb5f1da4044709b8f6f)
Diffstat (limited to 'source4/librpc/ndr/ndr_samr.c')
-rw-r--r--source4/librpc/ndr/ndr_samr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/librpc/ndr/ndr_samr.c b/source4/librpc/ndr/ndr_samr.c
index fc42d56005..268d763383 100644
--- a/source4/librpc/ndr/ndr_samr.c
+++ b/source4/librpc/ndr/ndr_samr.c
@@ -43,7 +43,7 @@ static NTSTATUS ndr_push_samr_Name(struct ndr_push *ndr, int ndr_flags, struct s
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_uint16(ndr, 2*strlen_m(r->name)));
- NDR_CHECK(ndr_push_uint16(ndr, 2*strlen_m(r->name)));
+ NDR_CHECK(ndr_push_uint16(ndr, r->name_len));
NDR_CHECK(ndr_push_ptr(ndr, r->name));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;