mirror of
https://github.com/Tha14/toxic.git
synced 2025-12-06 19:46:35 +01:00
prefer param over static
Conflicts: testing/toxic/main.c
This commit is contained in:
6
prompt.c
6
prompt.c
@@ -15,7 +15,7 @@
|
||||
uint8_t pending_requests[MAX_STR_SIZE][CLIENT_ID_SIZE]; // XXX
|
||||
uint8_t num_requests=0; // XXX
|
||||
|
||||
extern void on_friendadded(int friendnumber);
|
||||
extern void on_friendadded(Messenger *m, int friendnumber);
|
||||
static char prompt_buf[MAX_STR_SIZE] = {0};
|
||||
static int prompt_buf_pos = 0;
|
||||
|
||||
@@ -87,7 +87,7 @@ void cmd_accept(ToxWindow *self, Messenger *m, char **args)
|
||||
wprintw(self->window, "Failed to add friend.\n");
|
||||
else {
|
||||
wprintw(self->window, "Friend accepted as: %d.\n", num);
|
||||
on_friendadded(num);
|
||||
on_friendadded(m, num);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ void cmd_add(ToxWindow *self, Messenger *m, char **args)
|
||||
break;
|
||||
default:
|
||||
wprintw(self->window, "Friend added as %d.\n", num);
|
||||
on_friendadded(num);
|
||||
on_friendadded(m, num);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user