diff options
author | Test_User <hax@andrewyu.org> | 2023-06-18 19:28:52 -0400 |
---|---|---|
committer | Test_User <hax@andrewyu.org> | 2023-06-18 19:28:52 -0400 |
commit | 11c8d7a22b0d29278d9cc88b1a50ab974a1e6e6f (patch) | |
tree | a05f24e3517b1d0ac83c207f14f685738091fa42 /commands.c | |
parent | 83cf1be35bbb7ba9868e61cb4a5406848e032c5a (diff) | |
download | c_coupserv-11c8d7a22b0d29278d9cc88b1a50ab974a1e6e6f.tar.gz c_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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |