Minor formatting foibles
This commit is contained in:
parent
e30f4bfb07
commit
255e15fb7b
1 changed files with 6 additions and 7 deletions
13
src/sock.c
13
src/sock.c
|
@ -45,8 +45,12 @@ static size_t copy_addr_to_tx_buf(patty_ax25_sock *sock) {
|
|||
((uint8_t *)buf)[offset-1] &= ~1;
|
||||
|
||||
for (i=0; i<sock->hops; i++) {
|
||||
memcpy((uint8_t *)buf + offset, &sock->repeaters[i], sizeof(patty_ax25_addr));
|
||||
memcpy((uint8_t *)buf + offset,
|
||||
&sock->repeaters[i],
|
||||
sizeof(patty_ax25_addr));
|
||||
|
||||
offset += sizeof(patty_ax25_addr);
|
||||
|
||||
((uint8_t *)buf)[offset-1] &= ~1;
|
||||
}
|
||||
|
||||
|
@ -72,17 +76,12 @@ ssize_t patty_ax25_sock_send(patty_ax25_sock *sock,
|
|||
void *info,
|
||||
size_t infolen) {
|
||||
size_t offset = 0;
|
||||
ssize_t len;
|
||||
|
||||
if (toobig(sock, control, infolen)) {
|
||||
goto error_toobig;
|
||||
}
|
||||
|
||||
if ((len = copy_addr_to_tx_buf(sock)) < 0) {
|
||||
goto error_toobig;
|
||||
} else {
|
||||
offset += len;
|
||||
}
|
||||
offset = copy_addr_to_tx_buf(sock);
|
||||
|
||||
if (sock->mode == PATTY_AX25_SOCK_SABME) {
|
||||
((uint8_t *)sock->iface->tx_buf)[offset++] = (control & 0xff00) >> 8;
|
||||
|
|
Loading…
Add table
Reference in a new issue