1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-06 09:26:44 +02:00

Use (void) for empty parameter list in C.

This commit is contained in:
iphydf
2018-09-08 17:23:07 +00:00
parent 2be4847b53
commit bebff3be0e
10 changed files with 31 additions and 28 deletions

View File

@ -124,7 +124,7 @@ int hex_string_to_bin(const char *hex_string, size_t hex_len, char *output, size
}
for (size_t i = 0; i < output_size; ++i) {
sscanf(hex_string, "%2hhx", &output[i]);
sscanf(hex_string, "%2hhx", (unsigned char *)&output[i]);
hex_string += 2;
}
@ -141,7 +141,7 @@ int hex_string_to_bytes(char *buf, int size, const char *keystr)
const char *pos = keystr;
for (i = 0; i < size; ++i) {
res = sscanf(pos, "%2hhx", &buf[i]);
res = sscanf(pos, "%2hhx", (unsigned char *)&buf[i]);
pos += 2;
if (res == EOF || res < 1) {