diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-11-11 12:26:09 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-11-11 12:26:09 -0500 |
commit | 3d1a7d7dd7e10b9500953701cfd29b9aaa64862a (patch) | |
tree | 8ad939ddee8dadf22d95f62e74abd28480dd67ba | |
parent | 7c3378fb8d37e1f22ae7f04012e3e57a16b7f2fc (diff) | |
download | tor-3d1a7d7dd7e10b9500953701cfd29b9aaa64862a.tar.gz tor-3d1a7d7dd7e10b9500953701cfd29b9aaa64862a.zip |
Light grammar edits
-rw-r--r-- | src/lib/confmgt/unitparse.c | 8 | ||||
-rw-r--r-- | 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 8cbf9903e7..e8d9392ef6 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 3330a4c569..bde1567cb3 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) { |