From 5a3489865fa7efe40eaa59a4ca865387b25f0d35 Mon Sep 17 00:00:00 2001 From: Michael McVady Date: Sat, 13 Jan 2024 14:24:03 -0600 Subject: lint whitespace --- src/clog.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/clog.c') diff --git a/src/clog.c b/src/clog.c index 39d539c..6e222b6 100644 --- a/src/clog.c +++ b/src/clog.c @@ -83,7 +83,7 @@ void entry_query_init(struct entry_query *eq, const char *id, const char *query) if (id != NULL) { eq->id = kore_strdup(id); - } + } else { eq->id = NULL; } @@ -96,7 +96,7 @@ void entry_query_init(struct entry_query *eq, const char *id, const char *query) eq->query[i] = '|'; } } - } + } else { eq->query = NULL; } @@ -115,7 +115,7 @@ void entry_query_cleanup(struct entry_query *eq) { kore_free((void *) eq->id); } eq->id = NULL; - + if (eq->query != NULL) { kore_free((void *) eq->query); } @@ -247,11 +247,11 @@ int get_index(struct http_request *req) { // Write table footer. kore_buf_append(content, asset_table_footer_html, asset_len_table_footer_html); - + http_ok_resp(req, HTTP_STATUS_OK, content); - + out: ; - + kore_free(content); entry_query_cleanup(&eq); @@ -309,7 +309,7 @@ int get_entry(struct http_request *req) { out: ; entry_query_cleanup(&eq); - + kore_free(rendered_body); kore_free(content); @@ -330,7 +330,7 @@ int edit_entry(struct http_request *req) { id = kore_strdup(req->path + strlen("/entries/")); id[strlen(id) - strlen("/edit")] = '\0'; - + entry_query_init(&eq, (const char*) id, NULL); // Check for valid resource UUID @@ -390,7 +390,7 @@ int update_entry(struct http_request *req) { char *id = NULL; char *title = NULL; char *body = NULL; - + http_populate_post(req); if (http_argument_get_string(req, "title", &title)) { @@ -493,11 +493,11 @@ int search_entries(struct http_request *req) { } http_ok_resp(req, HTTP_STATUS_OK, content); - + out: ; entry_query_cleanup(&eq); - + kore_free(content); return KORE_RESULT_OK; @@ -645,7 +645,7 @@ static int render_md(const char *in, struct kore_buf *out) { static unsigned parser_flags = 0; static unsigned renderer_flags = 0; - + parser_flags |= MD_FLAG_TABLES; parser_flags |= MD_FLAG_STRIKETHROUGH; // parser_flags |= MD_FLAG_TASKLISTS; -- cgit v1.2.3