summaryrefslogtreecommitdiff
path: root/commands.c
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2023-06-18 19:28:52 -0400
committerTest_User <hax@andrewyu.org>2023-06-18 19:28:52 -0400
commit11c8d7a22b0d29278d9cc88b1a50ab974a1e6e6f (patch)
treea05f24e3517b1d0ac83c207f14f685738091fa42 /commands.c
parent83cf1be35bbb7ba9868e61cb4a5406848e032c5a (diff)
downloadcoupserv-11c8d7a22b0d29278d9cc88b1a50ab974a1e6e6f.tar.gz
coupserv-11c8d7a22b0d29278d9cc88b1a50ab974a1e6e6f.zip
Add -Wsign-conversion, change related things to match as desired, move gnutls_record_recv to tls.h/tls.c
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands.c b/commands.c
index d0d6d02..0938ee2 100644
--- a/commands.c
+++ b/commands.c
@@ -93,7 +93,7 @@ static struct pref_type_suff {
};
int sus_command(struct string sender, struct string original_message, struct string to, uint64_t argc, struct string *argv) {
- uint64_t index = random() % (sizeof(sus_strings)/sizeof(sus_strings[0]));
+ uint64_t index = (uint64_t)random() % (sizeof(sus_strings)/sizeof(sus_strings[0]));
SEND(sus_strings[index].pref);
if (sus_strings[index].type == 0)
@@ -112,7 +112,7 @@ static struct command_def sus_command_def = {
};
int cr_command(struct string sender, struct string original_message, struct string to, uint64_t argc, struct string *argv) {
- uint64_t index = random() % (sizeof(cr_strings)/sizeof(cr_strings[0]));
+ uint64_t index = (uint64_t)random() % (sizeof(cr_strings)/sizeof(cr_strings[0]));
SEND(cr_strings[index].pref);
if (cr_strings[index].type == 0)