diff options
Diffstat (limited to 'ax25/rxecho.c')
-rw-r--r-- | ax25/rxecho.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ax25/rxecho.c b/ax25/rxecho.c index 7acb156..e9c7daa 100644 --- a/ax25/rxecho.c +++ b/ax25/rxecho.c @@ -136,7 +136,7 @@ static void terminate(int sig) syslog(LOG_INFO, "terminating on SIGTERM\n"); closelog(); } - + exit(0); } @@ -238,7 +238,7 @@ static struct config *readconfig(void) } /* - * Slightly modified from linux/include/net/ax25.h and + * Slightly modified from linux/include/net/ax25.h and * linux/net/ax25/ax25_subr.c: */ @@ -264,13 +264,13 @@ typedef struct { static unsigned char *ax25_parse_addr(unsigned char *buf, int len, ax25_address *src, ax25_address *dest, ax25_digi *digi) { int d = 0; - + if (len < 14) return NULL; - + #if 0 if (flags != NULL) { *flags = 0; - + if (buf[6] & LAPB_C) { *flags = C_COMMAND; } @@ -279,16 +279,16 @@ static unsigned char *ax25_parse_addr(unsigned char *buf, int len, ax25_address *flags = C_RESPONSE; } } - - if (dama != NULL) + + if (dama != NULL) *dama = ~buf[13] & DAMA_FLAG; #endif - + /* Copy to, from */ - if (dest != NULL) + if (dest != NULL) memcpy(dest, buf + 0, AX25_ADDR_LEN); - if (src != NULL) + if (src != NULL) memcpy(src, buf + 7, AX25_ADDR_LEN); buf += 2 * AX25_ADDR_LEN; @@ -296,7 +296,7 @@ static unsigned char *ax25_parse_addr(unsigned char *buf, int len, ax25_address digi->lastrepeat = -1; digi->ndigi = 0; - + while (!(buf[-1] & LAPB_E)) { if (d >= AX25_MAX_DIGIS) return NULL; /* Max of 6 digis */ if (len < 7) return NULL; /* Short packet */ |