summaryrefslogtreecommitdiff
path: root/src/or/rendcommon.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-04-25 20:37:37 +0000
committerRoger Dingledine <arma@torproject.org>2004-04-25 20:37:37 +0000
commit25d54257fb3e0da7a613a2e774e935d1b8b662df (patch)
treeefb6b6c7312de01e60748775d098b6ca0dcbeee3 /src/or/rendcommon.c
parent37192bd25e82ce3885cc9ce01152fefefb9945c6 (diff)
downloadtor-25d54257fb3e0da7a613a2e774e935d1b8b662df.tar.gz
tor-25d54257fb3e0da7a613a2e774e935d1b8b662df.zip
use tor_assert
remove obsolete BUF_OK macro svn:r1697
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r--src/or/rendcommon.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c
index 7ace58775c..7965e0fa43 100644
--- a/src/or/rendcommon.c
+++ b/src/or/rendcommon.c
@@ -62,7 +62,7 @@ rend_encode_service_descriptor(rend_service_descriptor_t *desc,
return -1;
}
cp += i;
- assert(*len_out == (cp-*str_out));
+ tor_assert(*len_out == (cp-*str_out));
return 0;
}
@@ -127,7 +127,7 @@ rend_service_descriptor_t *rend_parse_service_descriptor(
int rend_get_service_id(crypto_pk_env_t *pk, char *out)
{
char buf[DIGEST_LEN];
- assert(pk);
+ tor_assert(pk);
if (crypto_pk_get_digest(pk, buf) < 0)
return -1;
if (base32_encode(out, REND_SERVICE_ID_LEN+1, buf, 10) < 0)
@@ -185,7 +185,7 @@ int rend_valid_service_id(char *query) {
int rend_cache_lookup_entry(char *query, rend_cache_entry_t **e)
{
- assert(rend_cache);
+ tor_assert(rend_cache);
if (!rend_valid_service_id(query))
return -1;
*e = strmap_get_lc(rend_cache, query);
@@ -222,7 +222,7 @@ int rend_cache_store(char *desc, int desc_len)
rend_service_descriptor_t *parsed;
char query[REND_SERVICE_ID_LEN+1];
time_t now;
- assert(rend_cache);
+ tor_assert(rend_cache);
parsed = rend_parse_service_descriptor(desc,desc_len);
if (!parsed) {
log_fn(LOG_WARN,"Couldn't parse service descriptor");
@@ -307,7 +307,7 @@ void rend_process_relay_cell(circuit_t *circ, int command, int length,
r = rend_client_rendezvous_acked(circ,payload,length);
break;
default:
- assert(0);
+ tor_assert(0);
}
}