[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Thu Apr 1 17:51:01 UTC 2021

The branch, master has been updated
       via  97e657b89b6 asn1: Remove unused function asn1_check_enumerated()
      from  1b183f57512 selftest: Allow to set the 'log level' for clients


- Log -----------------------------------------------------------------
commit 97e657b89b63f1df1e3280ffc563876c27439f44
Author: Joseph Sutton <josephsutton at catalyst.net.nz>
Date:   Fri Mar 19 12:47:57 2021 +1300

    asn1: Remove unused function asn1_check_enumerated()
    This function was reported as containing a bug, but it is unused and so
    can be safely removed.
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=4153
    Signed-off-by: Joseph Sutton <josephsutton at catalyst.net.nz>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: David Mulder <dmulder at samba.org>
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu Apr  1 17:50:49 UTC 2021 on sn-devel-184


Summary of changes:
 lib/util/asn1.c | 14 --------------
 lib/util/asn1.h |  1 -
 2 files changed, 15 deletions(-)

Changeset truncated at 500 lines:

diff --git a/lib/util/asn1.c b/lib/util/asn1.c
index 9ab9e1b0844..1a92a55c247 100644
--- a/lib/util/asn1.c
+++ b/lib/util/asn1.c
@@ -1085,20 +1085,6 @@ bool asn1_read_enumerated(struct asn1_data *data, int *v)
 	return asn1_end_tag(data);
-/* check a enumerated value is correct */
-bool asn1_check_enumerated(struct asn1_data *data, int v)
-	uint8_t b;
-	if (!asn1_start_tag(data, ASN1_ENUMERATED)) return false;
-	if (!asn1_read_uint8(data, &b)) return false;
-	if (!asn1_end_tag(data)) return false;
-	if (v != b)
-		data->has_error = false;
-	return !data->has_error;
 /* write an enumerated value to the stream */
 bool asn1_write_enumerated(struct asn1_data *data, uint8_t v)
diff --git a/lib/util/asn1.h b/lib/util/asn1.h
index de92a767f14..9043c34f46e 100644
--- a/lib/util/asn1.h
+++ b/lib/util/asn1.h
@@ -99,7 +99,6 @@ bool asn1_read_implicit_Integer(struct asn1_data *data, int *i);
 bool asn1_read_Integer(struct asn1_data *data, int *i);
 bool asn1_read_BitString(struct asn1_data *data, TALLOC_CTX *mem_ctx, DATA_BLOB *blob, uint8_t *padding);
 bool asn1_read_enumerated(struct asn1_data *data, int *v);
-bool asn1_check_enumerated(struct asn1_data *data, int v);
 bool asn1_write_enumerated(struct asn1_data *data, uint8_t v);
 bool asn1_blob(const struct asn1_data *asn1, DATA_BLOB *blob);
 bool asn1_extract_blob(struct asn1_data *asn1, TALLOC_CTX *mem_ctx,

Samba Shared Repository

More information about the samba-cvs mailing list