Skip to content

Commit 20d9685

Browse files
authored
Merge pull request #9 from iphydf/void-param
Use (void) for empty parameter list in C.
2 parents b253078 + ed06df4 commit 20d9685

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

minitox.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ char* genmsg(struct ChatHist **pp, const char *fmt, ...) {
224224
return h->msg;
225225
}
226226

227-
char* getftime() {
227+
char* getftime(void) {
228228
static char timebuf[64];
229229

230230
time_t tt = time(NULL);
@@ -338,7 +338,7 @@ char *bin2hex(const uint8_t *bin, size_t length) {
338338
return saved;
339339
}
340340

341-
struct ChatHist ** get_current_histp() {
341+
struct ChatHist ** get_current_histp(void) {
342342
if (TalkingTo == TALK_TYPE_NULL) return NULL;
343343
uint32_t num = INDEX_TO_NUM(TalkingTo);
344344
switch (INDEX_TO_TYPE(TalkingTo)) {
@@ -374,11 +374,11 @@ struct termios saved_tattr;
374374

375375
struct AsyncREPL *async_repl;
376376

377-
void arepl_exit() {
377+
void arepl_exit(void) {
378378
tcsetattr(NEW_STDIN_FILENO, TCSAFLUSH, &saved_tattr);
379379
}
380380

381-
void setup_arepl() {
381+
void setup_arepl(void) {
382382
if (!(isatty(STDIN_FILENO) && isatty(STDOUT_FILENO))) {
383383
fputs("! stdout & stdin should be connected to tty", stderr);
384384
exit(1);
@@ -678,7 +678,7 @@ void group_peer_name_cb(Tox *tox, uint32_t group_num, uint32_t peer_num, const u
678678
*
679679
******************************************************************************/
680680

681-
void create_tox()
681+
void create_tox(void)
682682
{
683683
struct Tox_Options *options = tox_options_new(NULL);
684684
tox_options_set_start_port(options, PORT_RANGE_START);
@@ -708,7 +708,7 @@ void create_tox()
708708
tox_options_free(options);
709709
}
710710

711-
void init_friends() {
711+
void init_friends(void) {
712712
size_t sz = tox_self_get_friend_list_size(tox);
713713
uint32_t *friend_list = malloc(sizeof(uint32_t) * sz);
714714
tox_self_get_friend_list(tox, friend_list);
@@ -744,7 +744,7 @@ void init_friends() {
744744
tox_self_get_public_key(tox, self.pubkey);
745745
}
746746

747-
void update_savedata_file()
747+
void update_savedata_file(void)
748748
{
749749
if (!(savedata_filename && savedata_tmp_filename)) return;
750750

@@ -761,7 +761,7 @@ void update_savedata_file()
761761
free(savedata);
762762
}
763763

764-
void bootstrap()
764+
void bootstrap(void)
765765
{
766766
for (size_t i = 0; i < sizeof(bootstrap_nodes)/sizeof(struct DHT_node); i ++) {
767767
uint8_t *bin = hex2bin(bootstrap_nodes[i].key_hex);
@@ -770,7 +770,7 @@ void bootstrap()
770770
}
771771
}
772772

773-
void setup_tox()
773+
void setup_tox(void)
774774
{
775775
create_tox();
776776
init_friends();
@@ -1248,7 +1248,7 @@ char *poptok(char **strp) {
12481248
return save;
12491249
}
12501250

1251-
void repl_iterate(){
1251+
void repl_iterate(void){
12521252
static char buf[128];
12531253
static char line[LINE_MAX_SIZE];
12541254
while (1) {

0 commit comments

Comments
 (0)