aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/.clang-format1
-rw-r--r--src/client_main.c2
-rw-r--r--src/storage_sqlite.c19
3 files changed, 11 insertions, 11 deletions
diff --git a/src/.clang-format b/src/.clang-format
index 301680e..87ad91d 100644
--- a/src/.clang-format
+++ b/src/.clang-format
@@ -11,3 +11,4 @@ IndentCaseLabels: false
ColumnLimit: 100
AlignConsecutiveMacros: Consecutive
AllowShortFunctionsOnASingleLine: Empty
+BreakStringLiterals: false
diff --git a/src/client_main.c b/src/client_main.c
index ac092d1..40d7995 100644
--- a/src/client_main.c
+++ b/src/client_main.c
@@ -24,9 +24,7 @@ static struct settings default_settings(void)
const char *get_usage_string(void)
{
- /* clang-format off */
return "[-h|--help] [-V|--version] [-v|--verbose] [-H|--host HOST] [-p|--port PORT] ACTION [ARG...]";
- /* clang-format on */
}
static int parse_settings(struct settings *settings, int argc, char *argv[])
diff --git a/src/storage_sqlite.c b/src/storage_sqlite.c
index b9acb2c..8de9c38 100644
--- a/src/storage_sqlite.c
+++ b/src/storage_sqlite.c
@@ -147,12 +147,13 @@ static int storage_sqlite_setup(struct storage_sqlite *storage)
static int storage_sqlite_prepare_statements(struct storage_sqlite *storage)
{
- /* clang-format off */
- static const char *const fmt_repo_find = "SELECT id FROM cimple_repos WHERE url = ?;";
- static const char *const fmt_repo_insert = "INSERT INTO cimple_repos(url) VALUES (?) ON CONFLICT(url) DO NOTHING;";
- static const char *const fmt_run_insert = "INSERT INTO cimple_runs(status, ec, output, repo_id, rev) VALUES (1, -1, x'', ?, ?) RETURNING id;";
- static const char *const fmt_run_finished = "UPDATE cimple_runs SET status = 2, ec = ? WHERE id = ?;";
- /* clang-format on */
+ static const char *const fmt_repo_find = "SELECT id FROM cimple_repos WHERE url = ?;";
+ static const char *const fmt_repo_insert =
+ "INSERT INTO cimple_repos(url) VALUES (?) ON CONFLICT(url) DO NOTHING;";
+ static const char *const fmt_run_insert =
+ "INSERT INTO cimple_runs(status, ec, output, repo_id, rev) VALUES (1, -1, x'', ?, ?) RETURNING id;";
+ static const char *const fmt_run_finished =
+ "UPDATE cimple_runs SET status = 2, ec = ? WHERE id = ?;";
int ret = 0;
@@ -380,9 +381,9 @@ free_url:
int storage_sqlite_get_run_queue(struct storage *storage, struct run_queue *queue)
{
- /* clang-format off */
- static const char *const fmt = "SELECT cimple_runs.id, cimple_repos.url, cimple_runs.rev FROM cimple_runs INNER JOIN cimple_repos ON cimple_runs.repo_id = cimple_repos.id WHERE cimple_runs.status = 1;";
- /* clang-format on */
+ static const char *const fmt =
+ "SELECT cimple_runs.id, cimple_repos.url, cimple_runs.rev FROM cimple_runs"
+ " INNER JOIN cimple_repos ON cimple_runs.repo_id = cimple_repos.id WHERE cimple_runs.status = 1;";
sqlite3_stmt *stmt;
int ret = 0;