mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Fix a couple more crypto_digest() calls to be explicit < 0
This commit is contained in:
parent
daeb633825
commit
41adfd6fa3
@ -715,7 +715,7 @@ dump_desc_populate_one_file, (const char *dirname, const char *f))
|
||||
* filename.
|
||||
*/
|
||||
if (crypto_digest256((char *)content_digest, desc, (size_t) st.st_size,
|
||||
DIGEST_SHA256) != 0) {
|
||||
DIGEST_SHA256) < 0) {
|
||||
/* Weird, but okay */
|
||||
log_info(LD_DIR,
|
||||
"Unable to hash content of %s from unparseable descriptors "
|
||||
@ -879,7 +879,7 @@ dump_desc(const char *desc, const char *type)
|
||||
/* Get the hash for logging purposes anyway */
|
||||
len = strlen(desc);
|
||||
if (crypto_digest256((char *)digest_sha256, desc, len,
|
||||
DIGEST_SHA256) != 0) {
|
||||
DIGEST_SHA256) < 0) {
|
||||
log_info(LD_DIR,
|
||||
"Unable to parse descriptor of type %s, and unable to even hash"
|
||||
" it!", type);
|
||||
|
Loading…
Reference in New Issue
Block a user