diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-11 10:09:12 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-11 11:16:50 -0400 |
commit | e014b72b73b2a299068f1ca5b7a22f2bea2f58f8 (patch) | |
tree | 1a488fb068a55ebaa7d1a8d29929a6dfa76608d8 /src/feature/dircache/consdiffmgr.h | |
parent | 5595b212270215eaa020603cabbe2c7b3b34d624 (diff) | |
download | tor-e014b72b73b2a299068f1ca5b7a22f2bea2f58f8.tar.gz tor-e014b72b73b2a299068f1ca5b7a22f2bea2f58f8.zip |
Stop memcpy'ing uncompressed consensuses when making diffs
Diffstat (limited to 'src/feature/dircache/consdiffmgr.h')
-rw-r--r-- | src/feature/dircache/consdiffmgr.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/feature/dircache/consdiffmgr.h b/src/feature/dircache/consdiffmgr.h index 66c3d65002..d6f273cc4e 100644 --- a/src/feature/dircache/consdiffmgr.h +++ b/src/feature/dircache/consdiffmgr.h @@ -68,8 +68,9 @@ STATIC consensus_cache_entry_t *cdm_cache_lookup_consensus( STATIC int cdm_entry_get_sha3_value(uint8_t *digest_out, consensus_cache_entry_t *ent, const char *label); -STATIC int uncompress_or_copy(char **out, size_t *outlen, - consensus_cache_entry_t *ent); +STATIC int uncompress_or_set_ptr(const char **out, size_t *outlen, + char **owned_out, + consensus_cache_entry_t *ent); #endif /* defined(CONSDIFFMGR_PRIVATE) */ #endif /* !defined(TOR_CONSDIFFMGR_H) */ |