Use PATTY_AX25_ADDRSTRLEN in patty_ax25_pton()
This commit is contained in:
parent
b8c19ea6cd
commit
eaa3a3a06a
1 changed files with 3 additions and 4 deletions
|
@ -13,8 +13,7 @@ enum addr_state {
|
|||
|
||||
int patty_ax25_pton(const char *callsign,
|
||||
patty_ax25_addr *addr) {
|
||||
size_t len = strlen(callsign),
|
||||
max = PATTY_AX25_CALLSIGN_LEN + 3; /* Account for SSID suffixes */
|
||||
size_t len = strlen(callsign);
|
||||
|
||||
int i,
|
||||
o = 0,
|
||||
|
@ -26,8 +25,8 @@ int patty_ax25_pton(const char *callsign,
|
|||
|
||||
if (len == 0) {
|
||||
goto error_invalid_callsign;
|
||||
} else if (len > max) {
|
||||
len = max;
|
||||
} else if (len > PATTY_AX25_ADDRSTRLEN) {
|
||||
len = PATTY_AX25_ADDRSTRLEN;
|
||||
}
|
||||
|
||||
for (i=0; i<len; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue