librpc/ndr: consolidate string conversion logic in ndr_pull_string
authorSean Finney <seanius@seanius.net>
Tue, 31 May 2011 07:49:18 +0000 (09:49 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 31 May 2011 22:30:40 +0000 (00:30 +0200)
commitc51795c747198f9e002505ffa39ad710beff0358
tree89f30804721cc6eb2410cb392869879a426244c7
parentf103e0c39f9f93b765a9cdb93a7600a1f6f06315
librpc/ndr: consolidate string conversion logic in ndr_pull_string

Reduce the amount of duplicate code in ndr_pull_string by moving the
almost duplicate conversion calls and their corresponding NDR pulls and
checks to a single location.  In the place of the removed calls is logic
allowing the conversion to be generalized, and and any specific
pulls/checks that do not apply to the general case.

This is similar to what has already been done in the switch statement
for ndr_push_string.

Signed-off-by: Sean Finney <seanius@seanius.net>
librpc/ndr/ndr_string.c