Skip to content

Commit 18f3d29

Browse files
committed
Run clang-format -i c_src/*.c
1 parent 610bda5 commit 18f3d29

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

c_src/sqlite3_nif.c

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,9 @@ make_sqlite3_error_tuple(ErlNifEnv* env, int rc, sqlite3* db)
9494
size_t len = utf8len(msg);
9595

9696
return enif_make_tuple2(
97-
env,
98-
make_atom(env, "error"),
99-
make_binary(env, msg, len)
100-
);
97+
env,
98+
make_atom(env, "error"),
99+
make_binary(env, msg, len));
101100
}
102101

103102
static ERL_NIF_TERM
@@ -145,7 +144,7 @@ exqlite_close(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
145144
assert(env);
146145

147146
connection_t* conn = NULL;
148-
int rc = SQLITE_OK;
147+
int rc = SQLITE_OK;
149148

150149
if (argc != 1) {
151150
return enif_make_badarg(env);
@@ -163,11 +162,11 @@ exqlite_close(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
163162
}
164163
}
165164

166-
// note: _v2 may not fully close the connection, hence why we check if
167-
// any transaction is open above, to make sure other connections aren't blocked.
165+
// note: _v2 may not fully close the connection, hence why we check if
166+
// any transaction is open above, to make sure other connections aren't blocked.
168167
// v1 is guaranteed to close or error, but will return error if any
169-
// unfinalized statements, which we likely have, as we rely on the destructors
170-
// to later run to clean those up
168+
// unfinalized statements, which we likely have, as we rely on the destructors
169+
// to later run to clean those up
171170
sqlite3_close_v2(conn->db);
172171

173172
conn->db = NULL;
@@ -408,17 +407,15 @@ make_cell(ErlNifEnv* env, sqlite3_stmt* statement, unsigned int i)
408407

409408
case SQLITE_BLOB:
410409
return make_binary(
411-
env,
412-
sqlite3_column_blob(statement, i),
413-
sqlite3_column_bytes(statement, i)
414-
);
410+
env,
411+
sqlite3_column_blob(statement, i),
412+
sqlite3_column_bytes(statement, i));
415413

416414
case SQLITE_TEXT:
417415
return make_binary(
418-
env,
419-
sqlite3_column_text(statement, i),
420-
sqlite3_column_bytes(statement, i)
421-
);
416+
env,
417+
sqlite3_column_text(statement, i),
418+
sqlite3_column_bytes(statement, i));
422419

423420
default:
424421
return make_atom(env, "unsupported");
@@ -571,8 +568,8 @@ exqlite_transaction_status(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
571568

572569
int autocommit = sqlite3_get_autocommit(conn->db);
573570
return make_ok_tuple(
574-
env,
575-
autocommit == 0 ? make_atom(env, "transaction") : make_atom(env, "idle"));
571+
env,
572+
autocommit == 0 ? make_atom(env, "transaction") : make_atom(env, "idle"));
576573
}
577574

578575
static void

0 commit comments

Comments
 (0)