add parentheses for explicit operator precedence

This commit is contained in:
Francois Perrad 2017-10-15 16:27:41 +02:00
parent f1d6c88759
commit dabf9217a1
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ int mp_fread(mp_int *a, int radix, FILE *stream)
y = (int)mp_s_rmap_reverse[pos];
if (y == 0xff || y >= radix) {
if ((y == 0xff) || (y >= radix)) {
break;
}

View File

@ -60,7 +60,7 @@ int mp_read_radix(mp_int *a, const char *str, int radix)
* and is less than the given radix add it
* to the number, otherwise exit the loop.
*/
if (y == 0xff || y >= radix) {
if ((y == 0xff) || (y >= radix)) {
break;
}
if ((res = mp_mul_d(a, (mp_digit)radix, a)) != MP_OKAY) {
@ -73,7 +73,7 @@ int mp_read_radix(mp_int *a, const char *str, int radix)
}
/* if an illegal character was found, fail. */
if (!(*str == '\0' || *str == '\r' || *str == '\n')) {
if (!((*str == '\0') || (*str == '\r') || (*str == '\n'))) {
mp_zero(a);
return MP_VAL;
}