Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added parenthesis to make some compilers more happy.

  • Loading branch information...
commit 6ac249af748ccff6fa51a5d8944a18fe3ee9f10d 1 parent 3d1be47
@derickr authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 mcon/connections.c
View
4 mcon/connections.c
@@ -372,7 +372,7 @@ int mongo_connection_ping(mongo_con_manager *manager, mongo_connection *con, cha
mongo_manager_log(manager, MLOG_CON, MLOG_FINE, "is_ping: pinging %s", con->hash);
gettimeofday(&start, NULL);
- if (con->last_ping + manager->ping_interval > start.tv_sec) {
+ if ((con->last_ping + manager->ping_interval) > start.tv_sec) {
mongo_manager_log(manager, MLOG_CON, MLOG_FINE, "is_ping: skipping: last ran at %ld, now: %ld, time left: %ld", con->last_ping, start.tv_sec, con->last_ping + manager->ping_interval - start.tv_sec);
return 2;
}
@@ -418,7 +418,7 @@ int mongo_connection_is_master(mongo_con_manager *manager, mongo_connection *con
int retval = 1;
gettimeofday(&now, NULL);
- if (con->last_is_master + manager->is_master_interval > now.tv_sec) {
+ if ((con->last_is_master + manager->is_master_interval) > now.tv_sec) {
mongo_manager_log(manager, MLOG_CON, MLOG_FINE, "is_master: skipping: last ran at %ld, now: %ld, time left: %ld", con->last_is_master, now.tv_sec, con->last_is_master + manager->is_master_interval - now.tv_sec);
return 2;
}
Please sign in to comment.
Something went wrong with that request. Please try again.