Minor formatting foibles

This commit is contained in:
XANTRONIX Development 2020-06-28 22:54:46 -04:00 committed by XANTRONIX Industrial
parent e30f4bfb07
commit 255e15fb7b

View file

@ -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;