diff options
author | teor <teor2345@gmail.com> | 2014-09-29 10:08:37 +1000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-28 20:51:23 -0400 |
commit | ff8fe38a2fac97d34bba4d46edabb4dd1bbe6d90 (patch) | |
tree | 78e3a12160d7455de69adb257aed0bdc281f3f72 /src/or/routerlist.c | |
parent | 5190ec0bc4c22d7bab756e21db6e357ba07379c4 (diff) | |
download | tor-ff8fe38a2fac97d34bba4d46edabb4dd1bbe6d90.tar.gz tor-ff8fe38a2fac97d34bba4d46edabb4dd1bbe6d90.zip |
Stop spurious clang shallow analysis null pointer errors
Avoid 4 null pointer errors under clang shallow analysis (the default when
building under Xcode) by using tor_assert() to prove that the pointers
aren't null. Resolves issue 13284 via minor code refactoring.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 1faa05f06f..22489a4476 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -475,6 +475,8 @@ trusted_dirs_remove_old_certs(void) time_t cert_published; if (newest == cert) continue; + /* resolve spurious clang shallow analysis null pointer errors */ + tor_assert(cert); expired = now > cert->expires; cert_published = cert->cache_info.published_on; /* Store expired certs for 48 hours after a newer arrives; |