[sr-dev] git:master: db_postgres: fixed condition checking the parameter for db uri parsing

Daniel-Constantin Mierla miconda at gmail.com
Tue Jan 28 18:44:51 CET 2014


Module: sip-router
Branch: master
Commit: 480b6d4dfc954fbbb8afb9dbbbf17b80dcdf71ce
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=480b6d4dfc954fbbb8afb9dbbbf17b80dcdf71ce

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Tue Jan 28 18:39:19 2014 +0100

db_postgres: fixed condition checking the parameter for db uri parsing

- on a report generated by cppcheck sent by David Binderman

---

 modules/db_postgres/pg_uri.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/db_postgres/pg_uri.c b/modules/db_postgres/pg_uri.c
index 61accdc..0980d70 100644
--- a/modules/db_postgres/pg_uri.c
+++ b/modules/db_postgres/pg_uri.c
@@ -118,7 +118,7 @@ static int parse_postgres_uri(struct pg_uri* res, str* uri)
 
 	prev_token = 0;
 
-	if (!res || !res) {
+	if (!res || !uri) {
 		goto err;
 	}
 	




More information about the sr-dev mailing list