Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
e6f3bf2a
Commit
e6f3bf2a
authored
May 02, 2004
by
Nick Mathewson
⛰
Browse files
tor_assert(), not assert()
svn:r1777
parent
3dd1ef87
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/common/fakepoll.c
View file @
e6f3bf2a
...
...
@@ -26,7 +26,6 @@
#elif defined(_MSC_VER)
#include
<winsock.h>
#endif
#include
<assert.h>
/* by default, windows handles only 64 fd's */
#if defined(MS_WINDOWS) && !defined(FD_SETSIZE)
...
...
@@ -61,7 +60,7 @@ tor_poll(struct pollfd *ufds, unsigned int nfds, int timeout)
for
(
idx
=
0
;
idx
<
nfds
;
++
idx
)
{
ufds
[
idx
].
revents
=
0
;
fd
=
ufds
[
idx
].
fd
;
assert
(
fd
>=
0
);
tor_
assert
(
fd
>=
0
);
if
(
fd
>
maxfd
)
{
maxfd
=
fd
;
#ifdef MS_WINDOWS
...
...
src/common/util.c
View file @
e6f3bf2a
...
...
@@ -1094,7 +1094,9 @@ tor_socketpair(int family, int type, int protocol, int fd[2])
/* On Windows, WSAEWOULDBLOCK is not always correct: when you see it,
* you need to ask the socket for its actual errno. Also, you need to
* get your errors from WSAGetLastError, not errno.
* get your errors from WSAGetLastError, not errno. (If you supply a
* socket of -1, we check WSAGetLastError, but don't correct
* WSAEWOULDBLOCKs.)
*/
#ifdef MS_WINDOWS
int
tor_socket_errno
(
int
sock
)
...
...
src/common/util.h
View file @
e6f3bf2a
...
...
@@ -256,7 +256,7 @@ const char *tor_socket_strerror(int e);
#define ERRNO_IS_EINPROGRESS(e) ((e) == EINPROGRESS)
#define ERRNO_IS_CONN_EINPROGRESS(e) ((e) == EINPROGRESS)
#define tor_socket_errno(sock) (errno)
#define tor_socket_strerror(e)
strerror(e)
#define tor_socket_strerror(e) strerror(e)
#endif
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment