Change += to |= for clearer semantics

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann 2023-02-15 15:44:24 +00:00
parent 34b3f1b757
commit f51851dc70

View File

@ -848,7 +848,7 @@ int mbedtls_oid_get_numeric_string(char *buf, size_t size,
return MBEDTLS_ERR_OID_BUF_TOO_SMALL;
}
value += oid->p[i] & 0x7F;
value |= oid->p[i] & 0x7F;
value <<= 7;
i++;
}
@ -856,7 +856,7 @@ int mbedtls_oid_get_numeric_string(char *buf, size_t size,
return MBEDTLS_ERR_OID_BUF_TOO_SMALL;
}
/* Last byte of first subidentifier */
value += oid->p[i] & 0x7F;
value |= oid->p[i] & 0x7F;
i++;
unsigned int component1 = value / 40;
@ -882,7 +882,7 @@ int mbedtls_oid_get_numeric_string(char *buf, size_t size,
}
value <<= 7;
value += oid->p[i] & 0x7F;
value |= oid->p[i] & 0x7F;
if (!(oid->p[i] & 0x80)) {
/* Last byte */