}
/*
- * To identity the method in the EVP method store, we mix the name identity
- * with the operation identity, with the assumption that we don't have more
+ * To identify the method in the EVP method store, we mix the name identity
+ * with the operation identity, under the assumption that we don't have more
* than 2^24 names or more than 2^8 operation types.
*
* The resulting identity is a 32-bit integer, composed like this:
*/
static uint32_t evp_method_id(unsigned int operation_id, int name_id)
{
- if (!ossl_assert(name_id < (1 << 24) || operation_id < (1 << 8))
- || !ossl_assert(name_id > 0 && operation_id > 0))
+ if (!ossl_assert(name_id > 0 && name_id < (1 << 24))
+ || !ossl_assert(operation_id > 0 && operation_id < (1 << 8)))
return 0;
return ((name_id << 8) & 0xFFFFFF00) | (operation_id & 0x000000FF);
}