From 32576656bbc703fc90ca2a276d984a29f98fbedf Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Tue, 2 Jan 2024 17:50:33 -0500 Subject: [PATCH] Make the comment capitalization uniform --- other/bootstrap_daemon/src/command_line_arguments.c | 4 ++-- other/bootstrap_daemon/src/config.c | 10 +++++----- other/bootstrap_daemon/src/tox-bootstrapd.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/other/bootstrap_daemon/src/command_line_arguments.c b/other/bootstrap_daemon/src/command_line_arguments.c index e53a15d4..a2e696c3 100644 --- a/other/bootstrap_daemon/src/command_line_arguments.c +++ b/other/bootstrap_daemon/src/command_line_arguments.c @@ -25,8 +25,8 @@ static void print_help(void) { // 2 space indent - // make sure all lines fit into 80 columns - // make sure options are listed in alphabetical order + // Make sure all lines fit into 80 columns + // Make sure options are listed in alphabetical order log_write(LOG_LEVEL_INFO, "Usage: tox-bootstrapd [OPTION]... --config=FILE_PATH\n" "\n" diff --git a/other/bootstrap_daemon/src/config.c b/other/bootstrap_daemon/src/config.c index eccc3ebe..b20925b1 100644 --- a/other/bootstrap_daemon/src/config.c +++ b/other/bootstrap_daemon/src/config.c @@ -56,7 +56,7 @@ static void parse_tcp_relay_ports_config(config_t *cfg, uint16_t **tcp_relay_por log_write(LOG_LEVEL_INFO, "Port #%zu: %u\n", i, default_ports[i]); } - // similar procedure to the one of reading config file below + // Similar procedure to the one of reading config file below *tcp_relay_ports = (uint16_t *)malloc(default_ports_count * sizeof(uint16_t)); for (size_t i = 0; i < default_ports_count; ++i) { @@ -73,7 +73,7 @@ static void parse_tcp_relay_ports_config(config_t *cfg, uint16_t **tcp_relay_por ++*tcp_relay_port_count; } - // the loop above skips invalid ports, so we adjust the allocated memory size + // The loop above skips invalid ports, so we adjust the allocated memory size if ((*tcp_relay_port_count) > 0) { *tcp_relay_ports = (uint16_t *)realloc(*tcp_relay_ports, (*tcp_relay_port_count) * sizeof(uint16_t)); } else { @@ -103,7 +103,7 @@ static void parse_tcp_relay_ports_config(config_t *cfg, uint16_t **tcp_relay_por config_setting_t *elem = config_setting_get_elem(ports_array, i); if (elem == nullptr) { - // it's NULL if `ports_array` is not an array (we have that check earlier) or if `i` is out of range, which should not be + // It's NULL if `ports_array` is not an array (we have that check earlier) or if `i` is out of range, which should not be log_write(LOG_LEVEL_WARNING, "Port #%d: Something went wrong while parsing the port. Stopping reading ports.\n", i); break; } @@ -125,7 +125,7 @@ static void parse_tcp_relay_ports_config(config_t *cfg, uint16_t **tcp_relay_por ++*tcp_relay_port_count; } - // the loop above skips invalid ports, so we adjust the allocated memory size + // The loop above skips invalid ports, so we adjust the allocated memory size if ((*tcp_relay_port_count) > 0) { *tcp_relay_ports = (uint16_t *)realloc(*tcp_relay_ports, (*tcp_relay_port_count) * sizeof(uint16_t)); } else { @@ -265,7 +265,7 @@ int get_general_config(const char *cfg_file_path, char **pid_file_path, char **k log_write(LOG_LEVEL_INFO, "'%s': %s\n", NAME_ENABLE_TCP_RELAY, *enable_tcp_relay ? "true" : "false"); - // show info about tcp ports only if tcp relay is enabled + // Show info about tcp ports only if tcp relay is enabled if (*enable_tcp_relay) { if (*tcp_relay_port_count == 0) { log_write(LOG_LEVEL_ERROR, "No TCP ports could be read.\n"); diff --git a/other/bootstrap_daemon/src/tox-bootstrapd.c b/other/bootstrap_daemon/src/tox-bootstrapd.c index 2f8912c2..45b3bfc4 100644 --- a/other/bootstrap_daemon/src/tox-bootstrapd.c +++ b/other/bootstrap_daemon/src/tox-bootstrapd.c @@ -221,7 +221,7 @@ int main(int argc, char *argv[]) char *cfg_file_path = nullptr; bool run_in_foreground = false; - // choose backend for printing command line argument parsing output based on whether the daemon is being run from a terminal + // Choose backend for printing command line argument parsing output based on whether the daemon is being run from a terminal LOG_BACKEND log_backend = isatty(STDOUT_FILENO) ? LOG_BACKEND_STDOUT : LOG_BACKEND_SYSLOG; log_open(log_backend);