s4-attid: Uppercase ATTID type constants
authorKamen Mazdrashki <kamenim@samba.org>
Mon, 8 Nov 2010 14:27:22 +0000 (16:27 +0200)
committerKamen Mazdrashki <kamenim@samba.org>
Mon, 8 Nov 2010 23:06:41 +0000 (23:06 +0000)
Thanks Metze for noting this!

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Mon Nov  8 23:06:41 UTC 2010 on sn-devel-104

source4/dsdb/schema/prefixmap.h
source4/dsdb/schema/schema_prefixmap.c
source4/dsdb/schema/schema_query.c

index 74acecb4ffb58fa2755084845a6353f8341306b1..339a221fa613400ec827440debc0a79483ada81b 100644 (file)
  * Ref: MS-ADTS, 3.1.1.2.6 ATTRTYP
  */
 enum dsdb_attid_type {
  * Ref: MS-ADTS, 3.1.1.2.6 ATTRTYP
  */
 enum dsdb_attid_type {
-       dsdb_attid_type_pfm = 1,        /* attid in [0x00000000..0x7FFFFFFF] */
-       dsdb_attid_type_intid = 2,      /* attid in [0x80000000..0xBFFFFFFF] */
-       dsdb_attid_type_reserved = 3,   /* attid in [0xC0000000..0xFFFEFFFF] */
-       dsdb_attid_type_internal = 4,   /* attid in [0xFFFF0000..0xFFFFFFFF] */
+       DSDB_ATTID_TYPE_PFM = 1,        /* attid in [0x00000000..0x7FFFFFFF] */
+       DSDB_ATTID_TYPE_INTID = 2,      /* attid in [0x80000000..0xBFFFFFFF] */
+       DSDB_ATTID_TYPE_RESERVED = 3,   /* attid in [0xC0000000..0xFFFEFFFF] */
+       DSDB_ATTID_TYPE_INTERNAL = 4,   /* attid in [0xFFFF0000..0xFFFFFFFF] */
 };
 
 /**
 };
 
 /**
index 18920500d6a39e3804ef2ca6999586c4feaf01c4..371ec882cab3726d438a78777983d25797a63288 100644 (file)
 enum dsdb_attid_type dsdb_pfm_get_attid_type(uint32_t attid)
 {
        if (attid <= 0x7FFFFFFF) {
 enum dsdb_attid_type dsdb_pfm_get_attid_type(uint32_t attid)
 {
        if (attid <= 0x7FFFFFFF) {
-               return dsdb_attid_type_pfm;
+               return DSDB_ATTID_TYPE_PFM;
        }
        else if (attid <= 0xBFFFFFFF) {
        }
        else if (attid <= 0xBFFFFFFF) {
-               return dsdb_attid_type_intid;
+               return DSDB_ATTID_TYPE_INTID;
        }
        else if (attid <= 0xFFFEFFFF) {
        }
        else if (attid <= 0xFFFEFFFF) {
-               return dsdb_attid_type_reserved;
+               return DSDB_ATTID_TYPE_RESERVED;
        }
        else {
        }
        else {
-               return dsdb_attid_type_internal;
+               return DSDB_ATTID_TYPE_INTERNAL;
        }
 }
 
        }
 }
 
@@ -361,7 +361,7 @@ WERROR dsdb_schema_pfm_oid_from_attid(struct dsdb_schema_prefixmap *pfm, uint32_
        WERROR werr = WERR_OK;
 
        /* sanity check for attid requested */
        WERROR werr = WERR_OK;
 
        /* sanity check for attid requested */
-       if (dsdb_pfm_get_attid_type(attid) != dsdb_attid_type_pfm) {
+       if (dsdb_pfm_get_attid_type(attid) != DSDB_ATTID_TYPE_PFM) {
                return WERR_INVALID_PARAMETER;
        }
 
                return WERR_INVALID_PARAMETER;
        }
 
index 8ea79ff4bb01890d5bd04694d256ff1d340810cb..c92d273edf1960a83198ed82c9de32be9f29c813 100644 (file)
@@ -64,7 +64,7 @@ const struct dsdb_attribute *dsdb_attribute_by_attributeID_id(const struct dsdb_
        if (id == 0xFFFFFFFF) return NULL;
 
        /* check for msDS-IntId type attribute */
        if (id == 0xFFFFFFFF) return NULL;
 
        /* check for msDS-IntId type attribute */
-       if (dsdb_pfm_get_attid_type(id) == dsdb_attid_type_intid) {
+       if (dsdb_pfm_get_attid_type(id) == DSDB_ATTID_TYPE_INTID) {
                BINARY_ARRAY_SEARCH_P(schema->attributes_by_msDS_IntId,
                                      schema->num_int_id_attr, msDS_IntId, id, uint32_cmp, c);
                return c;
                BINARY_ARRAY_SEARCH_P(schema->attributes_by_msDS_IntId,
                                      schema->num_int_id_attr, msDS_IntId, id, uint32_cmp, c);
                return c;