s4-libcli: Add smb2_util_handle_empty().
authorAndreas Schneider <asn@samba.org>
Wed, 4 Dec 2013 13:01:47 +0000 (14:01 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 6 Dec 2013 00:14:09 +0000 (01:14 +0100)
Will be used in the next commit.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source4/libcli/smb2/util.c

index 8b4a86f332830b665d602e0fd1db683c5bd68232..e28c910fb236863c04895bb65c7f5825619917c6 100644 (file)
@@ -230,3 +230,12 @@ bool smb2_util_handle_equal(const struct smb2_handle h1,
 {
        return (h1.data[0] == h2.data[0]) && (h1.data[1] == h2.data[1]);
 }
+
+bool smb2_util_handle_empty(const struct smb2_handle h)
+{
+       struct smb2_handle empty;
+
+       ZERO_STRUCT(empty);
+
+       return smb2_util_handle_equal(h, empty);
+}