diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/address.c | 6 | ||||
-rw-r--r-- | src/common/crypto.c | 2 | ||||
-rw-r--r-- | src/common/crypto.h | 1 | ||||
-rw-r--r-- | src/common/tortls.c | 3 | ||||
-rw-r--r-- | src/common/util.c | 6 |
5 files changed, 10 insertions, 8 deletions
diff --git a/src/common/address.c b/src/common/address.c index 69049fa0af..3ecc11b90f 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -182,7 +182,7 @@ tor_addr_make_unspec(tor_addr_t *a) a->family = AF_UNSPEC; } -/** Set address <a>a</b> to the null address in address family <b>family</b>. +/** Set address <b>a</b> to the null address in address family <b>family</b>. * The null address for AF_INET is 0.0.0.0. The null address for AF_INET6 is * [::]. AF_UNSPEC is all null. */ void @@ -1463,8 +1463,8 @@ is_internal_IP(uint32_t ip, int for_listening) * allocated string holding the address portion and *<b>port_out</b> * to the port. * - * Don't do DNS lookups and don't allow domain names in the <ip> field. - * Don't accept <b>addrport</b> of the form "<ip>" or "<ip>:0". + * Don't do DNS lookups and don't allow domain names in the "ip" field. + * Don't accept <b>addrport</b> of the form "ip" or "ip:0". * * Return 0 on success, -1 on failure. */ int diff --git a/src/common/crypto.c b/src/common/crypto.c index f357934ac9..8a4ffb6948 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -1594,7 +1594,7 @@ struct crypto_digest_t { SHA256_CTX sha2; /**< state for SHA256 */ } d; /**< State for the digest we're using. Only one member of the * union is usable, depending on the value of <b>algorithm</b>. */ - ENUM_BF(digest_algorithm_t) algorithm : 8; /**< Which algorithm is in use? */ + digest_algorithm_bitfield_t algorithm : 8; /**< Which algorithm is in use? */ }; /** Allocate and return a new digest object to compute SHA1 digests. diff --git a/src/common/crypto.h b/src/common/crypto.h index 4f0f1c10c3..aa4271aa33 100644 --- a/src/common/crypto.h +++ b/src/common/crypto.h @@ -89,6 +89,7 @@ typedef enum { DIGEST_SHA256 = 1, } digest_algorithm_t; #define N_DIGEST_ALGORITHMS (DIGEST_SHA256+1) +#define digest_algorithm_bitfield_t ENUM_BF(digest_algorithm_t) /** A set of all the digests we know how to compute, taken on a single * string. Any digests that are shorter than 256 bits are right-padded diff --git a/src/common/tortls.c b/src/common/tortls.c index 315a767e9e..8defab2adb 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -149,6 +149,7 @@ typedef enum { TOR_TLS_ST_SENTCLOSE, TOR_TLS_ST_CLOSED, TOR_TLS_ST_RENEGOTIATE, TOR_TLS_ST_BUFFEREVENT } tor_tls_state_t; +#define tor_tls_state_bitfield_t ENUM_BF(tor_tls_state_t) /** Holds a SSL object and its associated data. Members are only * accessed from within tortls.c. @@ -159,7 +160,7 @@ struct tor_tls_t { SSL *ssl; /**< An OpenSSL SSL object. */ int socket; /**< The underlying file descriptor for this TLS connection. */ char *address; /**< An address to log when describing this connection. */ - ENUM_BF(tor_tls_state_t) state : 3; /**< The current SSL state, + tor_tls_state_bitfield_t state : 3; /**< The current SSL state, * depending on which operations * have completed successfully. */ unsigned int isServer:1; /**< True iff this is a server-side connection */ diff --git a/src/common/util.c b/src/common/util.c index 3c2f6643ad..a0adb15ffe 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -898,8 +898,8 @@ tor_digest_is_zero(const char *digest) return tor_memeq(digest, ZERO_DIGEST, DIGEST_LEN); } -/** Return true if <b>string</b> is a valid '<key>=[<value>]' string. - * <value> is optional, to indicate the empty string. Log at logging +/** Return true if <b>string</b> is a valid 'key=[value]' string. + * "value" is optional, to indicate the empty string. Log at logging * <b>severity</b> if something ugly happens. */ int string_is_key_value(int severity, const char *string) @@ -3026,7 +3026,7 @@ tor_vsscanf(const char *buf, const char *pattern, va_list ap) /** Minimal sscanf replacement: parse <b>buf</b> according to <b>pattern</b> * and store the results in the corresponding argument fields. Differs from * sscanf in that: - * <ul><li>It only handles %u, %lu, %x, %lx, %<NUM>s, %d, %ld, %lf, and %c. + * <ul><li>It only handles %u, %lu, %x, %lx, %[NUM]s, %d, %ld, %lf, and %c. * <li>It only handles decimal inputs for %lf. (12.3, not 1.23e1) * <li>It does not handle arbitrarily long widths. * <li>Numbers do not consume any space characters. |