Skip to content

Commit

Permalink
style: format C files
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Feb 2, 2024
1 parent 73d2378 commit 2e64972
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions ext/sqlite3/exception.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,16 @@ rb_sqlite3_raise(sqlite3 *db, int status)
* accepts a sqlite3 error message as the final argument, which will be `sqlite3_free`d
*/
void
rb_sqlite3_raise_msg(sqlite3 *db, int status, const char* msg)
rb_sqlite3_raise_msg(sqlite3 *db, int status, const char *msg)
{
VALUE exception;
VALUE exception;

if (status == SQLITE_OK) {
return;
}
if (status == SQLITE_OK) {
return;
}

exception = rb_exc_new2(rb_path2class("SQLite3::Exception"), msg);
sqlite3_free((void*)msg);
rb_iv_set(exception, "@code", INT2FIX(status));
rb_exc_raise(exception);
exception = rb_exc_new2(rb_path2class("SQLite3::Exception"), msg);
sqlite3_free((void *)msg);
rb_iv_set(exception, "@code", INT2FIX(status));
rb_exc_raise(exception);
}
2 changes: 1 addition & 1 deletion ext/sqlite3/exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
#define CHECK_MSG(_db, _status, _msg) rb_sqlite3_raise_msg(_db, _status, _msg);

void rb_sqlite3_raise(sqlite3 *db, int status);
void rb_sqlite3_raise_msg(sqlite3 *db, int status, const char* msg);
void rb_sqlite3_raise_msg(sqlite3 *db, int status, const char *msg);

#endif

0 comments on commit 2e64972

Please sign in to comment.