diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-11-30 06:27:59 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-11-30 06:27:59 +0000 |
commit | 9cec3a13f510f09f328f824796676f24a99ccf35 (patch) | |
tree | 399bc151d8add56eefb4477e5cb384a848dda850 /src/common | |
parent | a6eb8cd2a0a206c7cc975751044723e4bcc60b7b (diff) | |
download | tor-9cec3a13f510f09f328f824796676f24a99ccf35.tar.gz tor-9cec3a13f510f09f328f824796676f24a99ccf35.zip |
remove some functions that are not used; #if0 out some files that are not likely to be used.
svn:r5471
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/container.c | 11 | ||||
-rw-r--r-- | src/common/container.h | 1 | ||||
-rw-r--r-- | src/common/crypto.c | 9 | ||||
-rw-r--r-- | src/common/crypto.h | 1 | ||||
-rw-r--r-- | src/common/log.c | 3 | ||||
-rw-r--r-- | src/common/log.h | 1 |
6 files changed, 3 insertions, 23 deletions
diff --git a/src/common/container.c b/src/common/container.c index 09951bae4d..6053f37ae1 100644 --- a/src/common/container.c +++ b/src/common/container.c @@ -77,17 +77,6 @@ smartlist_clear(smartlist_t *sl) sl->num_used = 0; } -/** Set the list's new length to <b>len</b> (which must be \<= the list's - * current size). Remove the last smartlist_len(sl)-len elements from the - * list. - */ -void -smartlist_truncate(smartlist_t *sl, int len) -{ - tor_assert(len <= sl->num_used); - sl->num_used = len; -} - /** Append element to the end of the list. */ void smartlist_add(smartlist_t *sl, void *element) diff --git a/src/common/container.h b/src/common/container.h index 443a2ebcbc..93942ed972 100644 --- a/src/common/container.h +++ b/src/common/container.h @@ -25,7 +25,6 @@ smartlist_t *smartlist_create(void); void smartlist_free(smartlist_t *sl); void smartlist_set_capacity(smartlist_t *sl, int n); void smartlist_clear(smartlist_t *sl); -void smartlist_truncate(smartlist_t *sl, int n); void smartlist_add(smartlist_t *sl, void *element); void smartlist_add_all(smartlist_t *sl, const smartlist_t *s2); void smartlist_remove(smartlist_t *sl, void *element); diff --git a/src/common/crypto.c b/src/common/crypto.c index 4ebeb949e2..41ef3396a9 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -1205,15 +1205,6 @@ crypto_cipher_decrypt(crypto_cipher_env_t *env, char *to, return 0; } -/** Move the position of the cipher stream backwards by <b>delta</b> bytes. - * Return 0 on success, -1 on failure. - */ -int -crypto_cipher_rewind(crypto_cipher_env_t *env, long delta) -{ - return crypto_cipher_advance(env, -delta); -} - /** Move the position of the cipher stream forwards by <b>delta</b> bytes. * Return 0 on success, -1 on failure. */ diff --git a/src/common/crypto.h b/src/common/crypto.h index 6b128fda63..edcb771449 100644 --- a/src/common/crypto.h +++ b/src/common/crypto.h @@ -120,7 +120,6 @@ int crypto_cipher_decrypt(crypto_cipher_env_t *env, char *to, const char *from, size_t fromlen); /* only implemented for CRYPTO_CIPHER_AES_CTR */ -int crypto_cipher_rewind(crypto_cipher_env_t *env, long delta); int crypto_cipher_advance(crypto_cipher_env_t *env, long delta); /* SHA-1 */ diff --git a/src/common/log.c b/src/common/log.c index 3cb7b764cb..6f6c403f53 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -324,7 +324,9 @@ close_logs(void) } } +#if 0 /** Close and re-open all log files; used to rotate logs on SIGHUP. */ +/* Nobody uses this. Remove it? XXXX */ void reset_logs(void) { @@ -340,6 +342,7 @@ reset_logs(void) lf = lf->next; } } +#endif /** Remove and free the log entry <b>victim</b> from the linked-list * logfiles (it must be present in the list when this function is diff --git a/src/common/log.h b/src/common/log.h index 40d66aab2a..1269469046 100644 --- a/src/common/log.h +++ b/src/common/log.h @@ -103,7 +103,6 @@ int add_callback_log(int loglevelMin, int loglevelMax, log_callback cb); int get_min_log_level(void); void switch_logs_debug(void); void close_logs(void); -void reset_logs(void); void add_temp_log(void); void close_temp_logs(void); void mark_logs_temp(void); |