From c9d0967dd9b236254f2f461b7dab3909ee826351 Mon Sep 17 00:00:00 2001 From: teor Date: Thu, 23 Oct 2014 02:35:46 +1100 Subject: Fix minor typos, two line lengths, and a repeated include --- src/common/address.c | 2 +- src/common/compat.c | 7 ++----- src/common/log.c | 4 ++-- src/or/buffers.c | 2 +- src/test/test_socks.c | 3 ++- 5 files changed, 8 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/common/address.c b/src/common/address.c index 07b76597da..20f4d14ddd 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -883,7 +883,7 @@ tor_addr_copy(tor_addr_t *dest, const tor_addr_t *src) memcpy(dest, src, sizeof(tor_addr_t)); } -/** Copy a tor_addr_t from src to dest, taking extra case to +/** Copy a tor_addr_t from src to dest, taking extra care to * copy only the well-defined portions. Used for computing hashes of * addresses. */ diff --git a/src/common/compat.c b/src/common/compat.c index b6fdb1ad78..0f9f4fadc3 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -77,6 +77,7 @@ /* Includes for the process attaching prevention */ #if defined(HAVE_SYS_PRCTL_H) && defined(__linux__) +/* Only use the linux prctl; the IRIX prctl is totally different */ #include #elif defined(__APPLE__) #include @@ -110,10 +111,6 @@ #ifdef HAVE_SYS_FILE_H #include #endif -#if defined(HAVE_SYS_PRCTL_H) && defined(__linux__) -/* Only use the linux prctl; the IRIX prctl is totally different */ -#include -#endif #ifdef TOR_UNIT_TESTS #if !defined(HAVE_USLEEP) && defined(HAVE_SYS_SELECT_H) /* as fallback implementation for tor_sleep_msec */ @@ -2883,7 +2880,7 @@ tor_localtime_r(const time_t *timep, struct tm *result) /** @} */ /** @{ */ -/** As gmtimee_r, but defined for platforms that don't have it: +/** As gmtime_r, but defined for platforms that don't have it: * * Convert *timep to a struct tm in UTC, and store the value in * *result. Return the result on success, or NULL on failure. diff --git a/src/common/log.c b/src/common/log.c index 4b3817780b..6bdc332e5c 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -371,8 +371,8 @@ pending_log_message_free(pending_log_message_t *msg) tor_free(msg); } -/** Return true iff lf would like to receive a message with the specified - * severity in the specified domain. +/** Return true iff lf would like to receive a message with the + * specified severity in the specified domain. */ static INLINE int logfile_wants_message(const logfile_t *lf, int severity, diff --git a/src/or/buffers.c b/src/or/buffers.c index 9f02824bff..b415c8f084 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1912,7 +1912,7 @@ parse_socks(const char *data, size_t datalen, socks_request_t *req, } *drain_out = 2u + usernamelen + 1u + passlen; req->got_auth = 1; - *want_length_out = 7; /* Minimal socks5 sommand. */ + *want_length_out = 7; /* Minimal socks5 command. */ return 0; } else if (req->auth_type == SOCKS_USER_PASS) { /* unknown version byte */ diff --git a/src/test/test_socks.c b/src/test/test_socks.c index 9aaa16e081..dea5f52b8b 100644 --- a/src/test/test_socks.c +++ b/src/test/test_socks.c @@ -392,7 +392,8 @@ test_socks_5_malformed_commands(void *ptr) /* XXX: Stringified address length > MAX_SOCKS_ADDR_LEN will never happen */ - /* SOCKS 5 Send CONNECT [01] to IP address 2.2.2.2:4369, with SafeSocks set */ + /** SOCKS 5 Send CONNECT [01] to IP address 2.2.2.2:4369, with SafeSocks set + */ ADD_DATA(buf, "\x05\x01\x00"); ADD_DATA(buf, "\x05\x01\x00\x01\x02\x02\x02\x02\x11\x11"); tt_int_op(fetch_from_buf_socks(buf, socks, get_options()->TestSocks, 1),==, -- cgit v1.2.3-54-g00ecf