aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-01-03 23:15:46 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-01-03 23:15:46 +0100
commitee2505ddaa4e2d056f9532a1b550dac14b67c02f (patch)
tree06715c4d5c7c9fbd8473eb58ea367a45c5c56557
parent0bf817b4bbd20c7333231a8c90c6d58c6c5e2f11 (diff)
Reformatted com_stats_andify()
-rw-r--r--FICS/comproc.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/FICS/comproc.c b/FICS/comproc.c
index 154e366..425b08b 100644
--- a/FICS/comproc.c
+++ b/FICS/comproc.c
@@ -299,23 +299,26 @@ FindPlayer(int p, char *name, int *p1, int *connected)
return 1;
}
-PRIVATE void com_stats_andify(int *numbers, int howmany, char *dest)
+PRIVATE void
+com_stats_andify(int *numbers, int howmany, char *dest)
{
- char tmp[10];
-
- *dest = '\0';
- while (howmany--) {
- sprintf(tmp, "%d", numbers[howmany]);
- strcat(dest, tmp);
- if (howmany > 1)
- sprintf(tmp, ", ");
- else if (howmany == 1)
- sprintf(tmp, " and ");
- else
- sprintf(tmp, ".\n");
- strcat(dest, tmp);
- }
- return;
+ char tmp[10] = { '\0' };
+
+ *dest = '\0';
+
+ while (howmany--) {
+ sprintf(tmp, "%d", numbers[howmany]);
+ strcat(dest, tmp);
+
+ if (howmany > 1)
+ sprintf(tmp, ", ");
+ else if (howmany == 1)
+ sprintf(tmp, " and ");
+ else
+ sprintf(tmp, ".\n");
+
+ strcat(dest, tmp);
+ }
}
PRIVATE void