diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-09-09 12:08:03 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-09 12:08:03 -0400 |
commit | 1eea7a68ed1534493ba2def4e2086fe8d9046e74 (patch) | |
tree | 78ba32b339f277905414f1618e492745a27568ef /src/common/util.c | |
parent | 409a56281eda6e0f39ecb1a2737eb4ab39b0229b (diff) | |
download | tor-1eea7a68ed1534493ba2def4e2086fe8d9046e74.tar.gz tor-1eea7a68ed1534493ba2def4e2086fe8d9046e74.zip |
Use S?SIZE_MAX, not S?SIZE_T_MAX
This fixes bug 13102 (not on any released Tor) where using the
standard SSIZE_MAX name broke mingw64, and we didn't realize.
I did this with
perl -i -pe 's/SIZE_T_MAX/SIZE_MAX/' src/*/*.[ch] src/*/*/*.[ch]
Diffstat (limited to 'src/common/util.c')
-rw-r--r-- | src/common/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/util.c b/src/common/util.c index 75dd6ed7f6..97cedd519d 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1786,7 +1786,7 @@ write_all(tor_socket_t fd, const char *buf, size_t count, int isSocket) { size_t written = 0; ssize_t result; - tor_assert(count < SSIZE_T_MAX); + tor_assert(count < SSIZE_MAX); while (written != count) { if (isSocket) @@ -1811,7 +1811,7 @@ read_all(tor_socket_t fd, char *buf, size_t count, int isSocket) size_t numread = 0; ssize_t result; - if (count > SIZE_T_CEILING || count > SSIZE_T_MAX) + if (count > SIZE_T_CEILING || count > SSIZE_MAX) return -1; while (numread != count) { @@ -4409,7 +4409,7 @@ tor_read_all_handle(HANDLE h, char *buf, size_t count, DWORD byte_count; BOOL process_exited = FALSE; - if (count > SIZE_T_CEILING || count > SSIZE_T_MAX) + if (count > SIZE_T_CEILING || count > SSIZE_MAX) return -1; while (numread != count) { @@ -4475,7 +4475,7 @@ tor_read_all_handle(FILE *h, char *buf, size_t count, if (eof) *eof = 0; - if (count > SIZE_T_CEILING || count > SSIZE_T_MAX) + if (count > SIZE_T_CEILING || count > SSIZE_MAX) return -1; while (numread != count) { |