diff options
author | Alexander Færøy <ahf@torproject.org> | 2017-04-17 14:22:13 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2017-04-17 14:22:13 +0200 |
commit | e8b025dfc30ef0008cb44feb56ab3c740d2bae9b (patch) | |
tree | fea87cfd1dfb36f07dbb8dac245ccc670b7ba52b /src | |
parent | 7460b9755aa0b9b4a54c5c80e47dfdf8c8fc513a (diff) | |
download | tor-e8b025dfc30ef0008cb44feb56ab3c740d2bae9b.tar.gz tor-e8b025dfc30ef0008cb44feb56ab3c740d2bae9b.zip |
Rename `zlib_compression_level_t` to `compression_level_t`.
See https://bugs.torproject.org/21663
Diffstat (limited to 'src')
-rw-r--r-- | src/common/torgzip.c | 6 | ||||
-rw-r--r-- | src/common/torgzip.h | 4 | ||||
-rw-r--r-- | src/or/directory.c | 2 | ||||
-rw-r--r-- | src/or/directory.h | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/src/common/torgzip.c b/src/common/torgzip.c index 223cd307a7..a6909cefea 100644 --- a/src/common/torgzip.c +++ b/src/common/torgzip.c @@ -74,7 +74,7 @@ tor_zlib_get_header_version_str(void) /** Return the 'bits' value to tell zlib to use <b>method</b>.*/ static inline int -method_bits(compress_method_t method, zlib_compression_level_t level) +method_bits(compress_method_t method, compression_level_t level) { /* Bits+16 means "use gzip" in zlib >= 1.2 */ const int flag = method == GZIP_METHOD ? 16 : 0; @@ -87,7 +87,7 @@ method_bits(compress_method_t method, zlib_compression_level_t level) } static inline int -get_memlevel(zlib_compression_level_t level) +get_memlevel(compression_level_t level) { switch (level) { default: @@ -419,7 +419,7 @@ struct tor_zlib_state_t { * decompression. */ tor_zlib_state_t * tor_zlib_new(int compress_, compress_method_t method, - zlib_compression_level_t compression_level) + compression_level_t compression_level) { tor_zlib_state_t *out; int bits, memlevel; diff --git a/src/common/torgzip.h b/src/common/torgzip.h index 42b45ab08a..cbcbb9978f 100644 --- a/src/common/torgzip.h +++ b/src/common/torgzip.h @@ -25,7 +25,7 @@ typedef enum { **/ typedef enum { HIGH_COMPRESSION, MEDIUM_COMPRESSION, LOW_COMPRESSION -} zlib_compression_level_t; +} compression_level_t; int tor_gzip_compress(char **out, size_t *out_len, @@ -54,7 +54,7 @@ typedef enum { /** Internal state for an incremental zlib compression/decompression. */ typedef struct tor_zlib_state_t tor_zlib_state_t; tor_zlib_state_t *tor_zlib_new(int compress, compress_method_t method, - zlib_compression_level_t level); + compression_level_t level); tor_zlib_output_t tor_zlib_process(tor_zlib_state_t *state, char **out, size_t *out_len, diff --git a/src/or/directory.c b/src/or/directory.c index 1b999ee7c3..bbe071b558 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -2845,7 +2845,7 @@ client_likes_consensus(networkstatus_t *v, const char *want_url) /** Return the compression level we should use for sending a compressed * response of size <b>n_bytes</b>. */ -STATIC zlib_compression_level_t +STATIC compression_level_t choose_compression_level(ssize_t n_bytes) { if (! have_been_under_memory_pressure()) { diff --git a/src/or/directory.h b/src/or/directory.h index 0c5db3e070..4c52c24049 100644 --- a/src/or/directory.h +++ b/src/or/directory.h @@ -181,7 +181,7 @@ STATIC int handle_post_hs_descriptor(const char *url, const char *body); STATIC char* authdir_type_to_string(dirinfo_type_t auth); STATIC const char * dir_conn_purpose_to_string(int purpose); STATIC int should_use_directory_guards(const or_options_t *options); -STATIC zlib_compression_level_t choose_compression_level(ssize_t n_bytes); +STATIC compression_level_t choose_compression_level(ssize_t n_bytes); STATIC const smartlist_t *find_dl_schedule(download_status_t *dls, const or_options_t *options); STATIC void find_dl_min_and_max_delay(download_status_t *dls, |