[tor-commits] [tor/master] Light grammar edits

nickm at torproject.org nickm at torproject.org
Mon Nov 11 17:26:17 UTC 2019


commit 3d1a7d7dd7e10b9500953701cfd29b9aaa64862a
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Nov 11 12:26:09 2019 -0500

    Light grammar edits
---
 src/lib/confmgt/unitparse.c | 8 +++++---
 src/lib/intmath/muldiv.c    | 4 ++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/lib/confmgt/unitparse.c b/src/lib/confmgt/unitparse.c
index 8cbf9903e..e8d9392ef 100644
--- a/src/lib/confmgt/unitparse.c
+++ b/src/lib/confmgt/unitparse.c
@@ -148,7 +148,7 @@ config_parse_units(const char *val, const unit_table_t *u, int *ok)
         d = u->multiplier * d;
 
         if (d < 0) {
-          log_warn(LD_CONFIG, "Negative value arised when parsing %s %s",
+          log_warn(LD_CONFIG, "Got a negative value while parsing %s %s",
                    val, u->unit);
           *ok = 0;
           goto done;
@@ -157,7 +157,8 @@ config_parse_units(const char *val, const unit_table_t *u, int *ok)
         // Some compilers may warn about casting a double to an unsigned type
         // because they don't know if d is >= 0
         if (d >= 0 && (d > (double)INT64_MAX || (uint64_t)d > INT64_MAX)) {
-          log_warn(LD_CONFIG, "Overflow detected parsing %s %s", val, u->unit);
+          log_warn(LD_CONFIG, "Overflow detected while parsing %s %s",
+                   val, u->unit);
           *ok = 0;
           goto done;
         }
@@ -167,7 +168,8 @@ config_parse_units(const char *val, const unit_table_t *u, int *ok)
         v = tor_mul_u64_nowrap(v, u->multiplier);
 
         if (v > INT64_MAX) {
-          log_warn(LD_CONFIG, "Overflow detected parsing %s %s", val, u->unit);
+          log_warn(LD_CONFIG, "Overflow detected while parsing %s %s",
+                   val, u->unit);
           *ok = 0;
           goto done;
         }
diff --git a/src/lib/intmath/muldiv.c b/src/lib/intmath/muldiv.c
index 3330a4c56..bde1567cb 100644
--- a/src/lib/intmath/muldiv.c
+++ b/src/lib/intmath/muldiv.c
@@ -69,8 +69,8 @@ gcd64(uint64_t a, uint64_t b)
   return a;
 }
 
-/** Return the unsigned integer product of <b>a</b> and <b>b</b>, if overflow
- * is detected return UINT64_MAX instead. */
+/** Return the unsigned integer product of <b>a</b> and <b>b</b>. If overflow
+ * is detected, return UINT64_MAX instead. */
 uint64_t
 tor_mul_u64_nowrap(uint64_t a, uint64_t b)
 {



More information about the tor-commits mailing list