summaryrefslogtreecommitdiff
path: root/librpc/ndr/uuid.c
diff options
context:
space:
mode:
Diffstat (limited to 'librpc/ndr/uuid.c')
-rw-r--r--librpc/ndr/uuid.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/librpc/ndr/uuid.c b/librpc/ndr/uuid.c
index b6a7fc7071..445b6dda7e 100644
--- a/librpc/ndr/uuid.c
+++ b/librpc/ndr/uuid.c
@@ -331,16 +331,14 @@ _PUBLIC_ char *NS_GUID_string(TALLOC_CTX *mem_ctx, const struct GUID *guid)
guid->node[4], guid->node[5]);
}
-_PUBLIC_ bool policy_handle_empty(struct policy_handle *h)
+_PUBLIC_ bool policy_handle_empty(const struct policy_handle *h)
{
return (h->handle_type == 0 && GUID_all_zero(&h->uuid));
}
_PUBLIC_ bool is_valid_policy_hnd(const struct policy_handle *hnd)
{
- struct policy_handle tmp;
- ZERO_STRUCT(tmp);
- return (memcmp(&tmp, hnd, sizeof(tmp)) != 0);
+ return !policy_handle_empty(hnd);
}
_PUBLIC_ bool policy_handle_equal(const struct policy_handle *hnd1,