Module: kamailio
Branch: master
Commit: f32e12b3159cf3cd411505f875ccc8c56cf7c68f
URL:
https://github.com/kamailio/kamailio/commit/f32e12b3159cf3cd411505f875ccc8c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-07-07T11:47:40+02:00
db_mongodb: fix warning for bool comparison
- reported by Olle E. Johansson, GH #696
---
Modified: modules/db_mongodb/mongodb_dbase.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f32e12b3159cf3cd411505f875ccc8c…
Patch:
https://github.com/kamailio/kamailio/commit/f32e12b3159cf3cd411505f875ccc8c…
---
diff --git a/modules/db_mongodb/mongodb_dbase.c b/modules/db_mongodb/mongodb_dbase.c
index cad8a27..0aa3d21 100644
--- a/modules/db_mongodb/mongodb_dbase.c
+++ b/modules/db_mongodb/mongodb_dbase.c
@@ -1204,7 +1204,7 @@ int db_mongodb_update(const db1_con_t* _h, const db_key_t* _k,
if(db_mongodb_bson_add(sdoc, _uk[i], _uv+i, i)<0)
goto error;
}
- if(bson_append_document(udoc, "$set", 4, sdoc)<0) {
+ if(!bson_append_document(udoc, "$set", 4, sdoc)) {
LM_ERR("failed to append document to bson document\n");
goto error;
}