Use tx_slots() inline function in src/sock.c
This commit is contained in:
parent
44ec0040a8
commit
fb982742f5
1 changed files with 6 additions and 5 deletions
11
src/sock.c
11
src/sock.c
|
@ -89,8 +89,8 @@ static inline void tx_slot_save(patty_ax25_sock *sock, void *buf, size_t len) {
|
|||
}
|
||||
|
||||
static int init_bufs(patty_ax25_sock *sock) {
|
||||
size_t i,
|
||||
slots = sock->mode == PATTY_AX25_SOCK_SABME? 128: 8;
|
||||
size_t slots = tx_slots(sock),
|
||||
i;
|
||||
|
||||
if ((sock->tx_buf = realloc(sock->tx_buf, tx_bufsz(sock))) == NULL) {
|
||||
goto error_realloc_tx_buf;
|
||||
|
@ -815,9 +815,10 @@ int patty_ax25_sock_ack(patty_ax25_sock *sock, int nr) {
|
|||
}
|
||||
|
||||
int patty_ax25_sock_ack_pending(patty_ax25_sock *sock) {
|
||||
int ret = 0,
|
||||
slots = sock->mode == PATTY_AX25_SOCK_SABME? 128: 8,
|
||||
i;
|
||||
int ret = 0;
|
||||
|
||||
size_t slots = tx_slots(sock),
|
||||
i;
|
||||
|
||||
for (i=0; i<slots; i++) {
|
||||
struct slot *slot = tx_slot(sock, i);
|
||||
|
|
Loading…
Add table
Reference in a new issue