From dabf9217a18ebf042238bcf401f1b6632b400716 Mon Sep 17 00:00:00 2001
From: Francois Perrad <francois.perrad@gadz.org>
Date: Sun, 15 Oct 2017 16:27:41 +0200
Subject: [PATCH] add parentheses for explicit operator precedence

---
 bn_mp_fread.c      | 2 +-
 bn_mp_read_radix.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bn_mp_fread.c b/bn_mp_fread.c
index 92fd73f..6922183 100644
--- a/bn_mp_fread.c
+++ b/bn_mp_fread.c
@@ -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;
       }
 
diff --git a/bn_mp_read_radix.c b/bn_mp_read_radix.c
index af1fb33..55c5ee1 100644
--- a/bn_mp_read_radix.c
+++ b/bn_mp_read_radix.c
@@ -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;
    }