Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin J. Thompson
Tor
Commits
878f4409
Commit
878f4409
authored
5 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Fix another time_t/long warning for 31343.
parent
cd6cb453
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/or/routerlist.c
+4
-3
4 additions, 3 deletions
src/or/routerlist.c
with
4 additions
and
3 deletions
src/or/routerlist.c
+
4
−
3
View file @
878f4409
...
...
@@ -5443,7 +5443,7 @@ int
router_differences_are_cosmetic
(
const
routerinfo_t
*
r1
,
const
routerinfo_t
*
r2
)
{
time_t
r1pub
,
r2pub
;
long
time_difference
;
time_t
time_difference
;
tor_assert
(
r1
&&
r2
);
/* r1 should be the one that was published first. */
...
...
@@ -5506,7 +5506,9 @@ router_differences_are_cosmetic(const routerinfo_t *r1, const routerinfo_t *r2)
* give or take some slop? */
r1pub
=
r1
->
cache_info
.
published_on
;
r2pub
=
r2
->
cache_info
.
published_on
;
time_difference
=
labs
(
r2
->
uptime
-
(
r1
->
uptime
+
(
r2pub
-
r1pub
)));
time_difference
=
r2
->
uptime
-
(
r1
->
uptime
+
(
r2pub
-
r1pub
));
if
(
time_difference
<
0
)
time_difference
=
-
time_difference
;
if
(
time_difference
>
ROUTER_ALLOW_UPTIME_DRIFT
&&
time_difference
>
r1
->
uptime
*
.
05
&&
time_difference
>
r2
->
uptime
*
.
05
)
...
...
@@ -5816,4 +5818,3 @@ refresh_all_country_info(void)
nodelist_refresh_countries
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment