Permalink
Browse files

Fix `node-waf list` errors in mysql_bindings_connection.cc

  • Loading branch information...
1 parent 27c85f0 commit 5ba9d7dce8644a18c267c136d9a1bd2c834399bb @Sannis committed Aug 17, 2010
Showing with 7 additions and 8 deletions.
  1. +7 −8 src/mysql_bindings_connection.cc
@@ -883,20 +883,19 @@ int MysqlConn::EIO_Query(eio_req *req) {
query_req->query_length);
if (r) {
req->result = 1;
- }
- else {
+ } else {
req->int1 = 1;
req->result = 0;
+
query_req->field_count = mysql_field_count(conn->_conn);
- if (!query_req->field_count) { /* no result set - not a SELECT, SHOW, DESCRIBE or EXPLAIN */
+ /* If no result set - not a SELECT, SHOW, DESCRIBE or EXPLAIN */
+ if (!query_req->field_count) {
req->int1 = 0;
- }
- else {
+ } else {
MYSQL_RES *my_result = mysql_store_result(conn->_conn);
if (my_result) {
query_req->my_result = my_result;
- }
- else {
+ } else {
req->result = 1;
}
}
@@ -928,7 +927,7 @@ Handle<Value> MysqlConn::QueryAsync(const Arguments& args) {
query_req->query_length = query.length();
query_req->query =
reinterpret_cast<char *>(calloc(query_req->query_length + 1,
- sizeof(char)));
+ sizeof(char))); //NOLINT
if (snprintf(query_req->query, query_req->query_length + 1, "%s", *query) !=
query_req->query_length) {

0 comments on commit 5ba9d7d

Please sign in to comment.