avoid calling smartlist_get(..., -1) if we have a consensus but no

hsdir nodes.


svn:r13270
This commit is contained in:
Roger Dingledine 2008-01-25 07:11:32 +00:00
parent d72ccd95a8
commit 5fcc79185f

View File

@ -4505,7 +4505,8 @@ hid_serv_responsible_for_desc_id(const char *query)
return 0; /* This is redundant, but let's be paranoid. */
my_id = me->cache_info.identity_digest;
responsible = smartlist_create();
if (hid_serv_get_responsible_directories(responsible, query)<0) {
(int) hid_serv_get_responsible_directories(responsible, query);
if (!smartlist_len(responsible)) {
smartlist_free(responsible);
return 0;
}