summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-08-28 10:23:05 -0400
committerNick Mathewson <nickm@torproject.org>2017-08-28 10:23:05 -0400
commit4b4b3afb569a40db99c1614bc83d835b0a23fe27 (patch)
tree0ab5237ed2bd79a06d0610eae3d9880a82c6c102 /src/common
parent5b8956df3b3bc4593c0372703cfb07d75b4fc15e (diff)
parentb88d00fea35630d96bf91bda362922af43730a04 (diff)
downloadtor-4b4b3afb569a40db99c1614bc83d835b0a23fe27.tar.gz
tor-4b4b3afb569a40db99c1614bc83d835b0a23fe27.zip
Merge branch 'bug22802_squashed'
Diffstat (limited to 'src/common')
-rw-r--r--src/common/procmon.c2
-rw-r--r--src/common/util.c8
2 files changed, 1 insertions, 9 deletions
diff --git a/src/common/procmon.c b/src/common/procmon.c
index d49e7f18f5..5ef16c7268 100644
--- a/src/common/procmon.c
+++ b/src/common/procmon.c
@@ -71,7 +71,7 @@ parse_process_specifier(const char *process_spec,
/* If we're lucky, long will turn out to be large enough to hold a
* PID everywhere that Tor runs. */
- pid_l = tor_parse_long(process_spec, 0, 1, LONG_MAX, &pid_ok, &pspec_next);
+ pid_l = tor_parse_long(process_spec, 10, 1, LONG_MAX, &pid_ok, &pspec_next);
/* Reserve room in the ‘process specifier’ for additional
* (platform-specific) identifying information beyond the PID, to
diff --git a/src/common/util.c b/src/common/util.c
index eff678d6a4..31d42a3e5c 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1233,15 +1233,7 @@ tor_parse_uint64(const char *s, int base, uint64_t min,
#ifdef HAVE_STRTOULL
r = (uint64_t)strtoull(s, &endptr, base);
#elif defined(_WIN32)
-#if defined(_MSC_VER) && _MSC_VER < 1300
- tor_assert(base <= 10);
- r = (uint64_t)_atoi64(s);
- endptr = (char*)s;
- while (TOR_ISSPACE(*endptr)) endptr++;
- while (TOR_ISDIGIT(*endptr)) endptr++;
-#else
r = (uint64_t)_strtoui64(s, &endptr, base);
-#endif
#elif SIZEOF_LONG == 8
r = (uint64_t)strtoul(s, &endptr, base);
#else