Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added parenthesis to make some compilers more happy.

  • Loading branch information...
commit 6ac249af748ccff6fa51a5d8944a18fe3ee9f10d 1 parent 3d1be47
Derick Rethans authored September 18, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  mcon/connections.c
4  mcon/connections.c
@@ -372,7 +372,7 @@ int mongo_connection_ping(mongo_con_manager *manager, mongo_connection *con, cha
372 372
 	mongo_manager_log(manager, MLOG_CON, MLOG_FINE, "is_ping: pinging %s", con->hash);
373 373
 
374 374
 	gettimeofday(&start, NULL);
375  
-	if (con->last_ping + manager->ping_interval > start.tv_sec) {
  375
+	if ((con->last_ping + manager->ping_interval) > start.tv_sec) {
376 376
 		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);
377 377
 		return 2;
378 378
 	}
@@ -418,7 +418,7 @@ int mongo_connection_is_master(mongo_con_manager *manager, mongo_connection *con
418 418
 	int            retval = 1;
419 419
 
420 420
 	gettimeofday(&now, NULL);
421  
-	if (con->last_is_master + manager->is_master_interval > now.tv_sec) {
  421
+	if ((con->last_is_master + manager->is_master_interval) > now.tv_sec) {
422 422
 		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);
423 423
 		return 2;
424 424
 	}

0 notes on commit 6ac249a

Please sign in to comment.
Something went wrong with that request. Please try again.