From c0019d724642f7b725d2515b586f96cce9a664bf Mon Sep 17 00:00:00 2001
From: Cory McWilliams <cory@unprompted.com>
Date: Wed, 14 May 2025 20:33:02 -0400
Subject: [PATCH] format

---
 src/ssb.db.c    | 14 ++++++++------
 src/ssb.tests.c |  5 ++++-
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/ssb.db.c b/src/ssb.db.c
index 11c56b6c4..f2cbf48c3 100644
--- a/src/ssb.db.c
+++ b/src/ssb.db.c
@@ -193,7 +193,9 @@ void tf_ssb_db_init(tf_ssb_t* ssb)
 	_tf_ssb_db_exec(db, "CREATE INDEX IF NOT EXISTS messages_author_sequence_index ON messages (author, sequence)");
 	_tf_ssb_db_exec(db, "CREATE INDEX IF NOT EXISTS messages_author_timestamp_index ON messages (author, timestamp)");
 	_tf_ssb_db_exec(db, "CREATE INDEX IF NOT EXISTS messages_channel_author_timestamp_root_index ON messages (content ->> 'channel', author, timestamp, content ->> 'root')");
-	_tf_ssb_db_exec(db, "CREATE INDEX IF NOT EXISTS messages_contact_index ON messages(author, sequence, content ->> '$.contact', content ->> '$.following', content ->> '$.blocking') WHERE content ->> '$.type' = 'contact'");
+	_tf_ssb_db_exec(db,
+		"CREATE INDEX IF NOT EXISTS messages_contact_index ON messages(author, sequence, content ->> '$.contact', content ->> '$.following', content ->> '$.blocking') WHERE "
+		"content ->> '$.type' = 'contact'");
 	_tf_ssb_db_exec(db, "CREATE INDEX IF NOT EXISTS messages_id_author_index ON messages (id, author)");
 	_tf_ssb_db_exec(db, "CREATE INDEX IF NOT EXISTS messages_size_by_author_index ON messages (author, length(content))");
 	_tf_ssb_db_exec(db, "CREATE INDEX IF NOT EXISTS messages_timestamp_index ON messages (timestamp)");
@@ -1664,11 +1666,11 @@ static sqlite3_stmt* _make_following_statement(sqlite3* db)
 	sqlite3_stmt* statement = NULL;
 
 	if (sqlite3_prepare(db,
-		"SELECT content ->> '$.contact' AS contact, content ->> '$.following', content ->> '$.blocking' "
-		"FROM messages "
-		"WHERE author = ? AND content ->> '$.type' = 'contact' AND contact IS NOT NULL "
-		"ORDER BY content ->> '$.contact', sequence",
-		-1, &statement, NULL) != SQLITE_OK)
+			"SELECT content ->> '$.contact' AS contact, content ->> '$.following', content ->> '$.blocking' "
+			"FROM messages "
+			"WHERE author = ? AND content ->> '$.type' = 'contact' AND contact IS NOT NULL "
+			"ORDER BY content ->> '$.contact', sequence",
+			-1, &statement, NULL) != SQLITE_OK)
 	{
 		tf_printf("prepare failed: %s", sqlite3_errmsg(db));
 	}
diff --git a/src/ssb.tests.c b/src/ssb.tests.c
index 0985e3d29..e356d8d48 100644
--- a/src/ssb.tests.c
+++ b/src/ssb.tests.c
@@ -1622,7 +1622,10 @@ void tf_ssb_test_following_perf(const tf_test_options_t* options)
 	for (int i = 0; i < 100; i++)
 	{
 		const char** ids = tf_ssb_db_get_all_visible_identities(ssb, 2);
-		while (ids[count]) { count++; }
+		while (ids[count])
+		{
+			count++;
+		}
 		tf_free(ids);
 	}
 	uint64_t end = uv_hrtime();