summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-05 10:31:31 -0500
committerNick Mathewson <nickm@torproject.org>2016-12-05 10:31:31 -0500
commit41adfd6fa38bf94bc7d71174dbaf7f32a41a64ec (patch)
tree57ffb96c98afe2adbff883a6a6fda0e05240b272 /src/or/routerparse.c
parentdaeb633825920ca99830c75a79d9a7d4ed211a13 (diff)
downloadtor-41adfd6fa38bf94bc7d71174dbaf7f32a41a64ec.tar.gz
tor-41adfd6fa38bf94bc7d71174dbaf7f32a41a64ec.zip
Fix a couple more crypto_digest() calls to be explicit < 0
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index f3246c954e..38ceb942a9 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -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);