aboutsummaryrefslogtreecommitdiffstats
path: root/init/init.c
diff options
context:
space:
mode:
authorturret <turret@duck.com>2023-12-18 16:13:36 -0600
committerturret <turret@duck.com>2023-12-18 16:13:36 -0600
commit54b308af97b91ceabb0a482f325d3a8595b01aa3 (patch)
treeadbe345bca29943f02f54c86dc1ec17d5aa3528a /init/init.c
parent22cacb4dc96faae8814a9696805314c0fcc455ba (diff)
downloaddiscord-bot-skeleton-54b308af97b91ceabb0a482f325d3a8595b01aa3.tar.gz
discord-bot-skeleton-54b308af97b91ceabb0a482f325d3a8595b01aa3.tar.bz2
discord-bot-skeleton-54b308af97b91ceabb0a482f325d3a8595b01aa3.zip
*: enforce 78 char line limit
Diffstat (limited to 'init/init.c')
-rw-r--r--init/init.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/init/init.c b/init/init.c
index c2ae3c4..e2ece8a 100644
--- a/init/init.c
+++ b/init/init.c
@@ -45,7 +45,9 @@ static void do_initcall_level(int level)
{
initcall_entry_t *fn;
- for (fn = initcall_levels[level - 1]; fn < initcall_levels[level]; fn++)
+ for (fn = initcall_levels[level - 1];
+ fn < initcall_levels[level];
+ fn++)
initcall_from_entry(fn)();
}
@@ -61,7 +63,8 @@ int main(void)
{
print("init: Hello world! Running " NAME " v" VERSION "!");
- /* set mainpid for the subsystem service so it is fully accessible during l1 */
+ /* set mainpid for the subsystem service so it is fully accessible
+ during l1 */
mainpid = getpid();
/* set stack_size for subsystem service */
@@ -77,7 +80,8 @@ int main(void)
if(!token_base)
panic("init: cannot find TOKEN in env");
- token = calloc(strlen(token_base) + strlen("Authorization: Bot ") + 1, sizeof(char));
+ token = calloc(strlen(token_base) + strlen("Authorization: Bot ") + 1,
+ sizeof(char));
strcpy(token, "Authorization: Bot ");
strcat(token, token_base);
@@ -97,7 +101,8 @@ int main(void)
int process = 0;
while((process = waitpid(-1, NULL, WNOHANG)) > 0)
if(subsystem_handle_term(process) > 0)
- print(LOG_WARNING "init: failed to reap process %d", process);
+ print(LOG_WARNING "init: failed to reap process %d",
+ process);
}
}