summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-11-03 10:45:59 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:44:13 +0100
commit7fdf5656046653cca8a4870bf02bc1e2beadccc1 (patch)
tree696c1bd207d761b5cb4f7d79518a0ac497e6e795
parent46ba5366bd1b2e456ef8d10c6f4b9611eb518696 (diff)
downloadsamba-7fdf5656046653cca8a4870bf02bc1e2beadccc1.tar.gz
samba-7fdf5656046653cca8a4870bf02bc1e2beadccc1.tar.bz2
samba-7fdf5656046653cca8a4870bf02bc1e2beadccc1.zip
r25822: use NDR_CHECK()
metze (This used to be commit c81aa2ba36904281692b84bcd37300e38760da34)
-rw-r--r--source4/libcli/nbt/nbtname.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/source4/libcli/nbt/nbtname.c b/source4/libcli/nbt/nbtname.c
index 3c2b58e0f7..1ee421b1f7 100644
--- a/source4/libcli/nbt/nbtname.c
+++ b/source4/libcli/nbt/nbtname.c
@@ -96,7 +96,6 @@ static NTSTATUS ndr_pull_component(struct ndr_pull *ndr, uint8_t **component,
*/
_PUBLIC_ NTSTATUS ndr_pull_nbt_string(struct ndr_pull *ndr, int ndr_flags, const char **s)
{
- NTSTATUS status;
uint32_t offset = ndr->offset;
uint32_t max_offset = offset;
unsigned num_components;
@@ -111,8 +110,7 @@ _PUBLIC_ NTSTATUS ndr_pull_nbt_string(struct ndr_pull *ndr, int ndr_flags, const
/* break up name into a list of components */
for (num_components=0;num_components<MAX_COMPONENTS;num_components++) {
uint8_t *component;
- status = ndr_pull_component(ndr, &component, &offset, &max_offset);
- NT_STATUS_NOT_OK_RETURN(status);
+ NDR_CHECK(ndr_pull_component(ndr, &component, &offset, &max_offset));
if (component == NULL) break;
if (name) {
name = talloc_asprintf_append_buffer(name, ".%s", component);
@@ -283,7 +281,6 @@ static uint8_t *compress_name(TALLOC_CTX *mem_ctx,
*/
_PUBLIC_ NTSTATUS ndr_pull_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct nbt_name *r)
{
- NTSTATUS status;
uint8_t *scope;
char *cname;
const char *s;
@@ -293,8 +290,7 @@ _PUBLIC_ NTSTATUS ndr_pull_nbt_name(struct ndr_pull *ndr, int ndr_flags, struct
return NT_STATUS_OK;
}
- status = ndr_pull_nbt_string(ndr, ndr_flags, &s);
- NT_STATUS_NOT_OK_RETURN(status);
+ NDR_CHECK(ndr_pull_nbt_string(ndr, ndr_flags, &s));
scope = (uint8_t *)strchr(s, '.');
if (scope) {