Skip to content

Commit ed06df4

Browse files
committed
Use (void) for empty parameter list in C.
1 parent 48fba6d commit ed06df4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

minitox.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ char* genmsg(struct ChatHist **pp, const char *fmt, ...) {
220220
return h->msg;
221221
}
222222

223-
char* getftime() {
223+
char* getftime(void) {
224224
static char timebuf[64];
225225

226226
time_t tt = time(NULL);
@@ -334,7 +334,7 @@ char *bin2hex(const uint8_t *bin, size_t length) {
334334
return saved;
335335
}
336336

337-
struct ChatHist ** get_current_histp() {
337+
struct ChatHist ** get_current_histp(void) {
338338
if (TalkingTo == TALK_TYPE_NULL) return NULL;
339339
uint32_t num = INDEX_TO_NUM(TalkingTo);
340340
switch (INDEX_TO_TYPE(TalkingTo)) {
@@ -370,11 +370,11 @@ struct termios saved_tattr;
370370

371371
struct AsyncREPL *async_repl;
372372

373-
void arepl_exit() {
373+
void arepl_exit(void) {
374374
tcsetattr(NEW_STDIN_FILENO, TCSAFLUSH, &saved_tattr);
375375
}
376376

377-
void setup_arepl() {
377+
void setup_arepl(void) {
378378
if (!(isatty(STDIN_FILENO) && isatty(STDOUT_FILENO))) {
379379
fputs("! stdout & stdin should be connected to tty", stderr);
380380
exit(1);
@@ -674,7 +674,7 @@ void group_peer_name_cb(Tox *tox, uint32_t group_num, uint32_t peer_num, const u
674674
*
675675
******************************************************************************/
676676

677-
void create_tox()
677+
void create_tox(void)
678678
{
679679
struct Tox_Options *options = tox_options_new(NULL);
680680
tox_options_set_start_port(options, PORT_RANGE_START);
@@ -704,7 +704,7 @@ void create_tox()
704704
tox_options_free(options);
705705
}
706706

707-
void init_friends() {
707+
void init_friends(void) {
708708
size_t sz = tox_self_get_friend_list_size(tox);
709709
uint32_t *friend_list = malloc(sizeof(uint32_t) * sz);
710710
tox_self_get_friend_list(tox, friend_list);
@@ -740,7 +740,7 @@ void init_friends() {
740740
tox_self_get_public_key(tox, self.pubkey);
741741
}
742742

743-
void update_savedata_file()
743+
void update_savedata_file(void)
744744
{
745745
if (!(savedata_filename && savedata_tmp_filename)) return;
746746

@@ -757,7 +757,7 @@ void update_savedata_file()
757757
free(savedata);
758758
}
759759

760-
void bootstrap()
760+
void bootstrap(void)
761761
{
762762
for (size_t i = 0; i < sizeof(bootstrap_nodes)/sizeof(struct DHT_node); i ++) {
763763
uint8_t *bin = hex2bin(bootstrap_nodes[i].key_hex);
@@ -766,7 +766,7 @@ void bootstrap()
766766
}
767767
}
768768

769-
void setup_tox()
769+
void setup_tox(void)
770770
{
771771
create_tox();
772772
init_friends();
@@ -1244,7 +1244,7 @@ char *poptok(char **strp) {
12441244
return save;
12451245
}
12461246

1247-
void repl_iterate(){
1247+
void repl_iterate(void){
12481248
static char buf[128];
12491249
static char line[LINE_MAX_SIZE];
12501250
while (1) {

0 commit comments

Comments
 (0)