[AX25]: Make ax2asc thread-proof

Ax2asc was still using a static buffer for all invocations which isn't
exactly SMP-safe.  Change ax2asc to take an additional result buffer as
the argument.  Change all callers to provide such a buffer.

Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ralf Baechle
2005-09-06 15:49:39 -07:00
committed by David S. Miller
parent f2c383988d
commit f75268cd6c
10 changed files with 39 additions and 24 deletions

View File

@@ -36,9 +36,8 @@ ax25_address null_ax25_address = {{0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00}};
/*
* ax25 -> ascii conversion
*/
char *ax2asc(ax25_address *a)
char *ax2asc(char *buf, ax25_address *a)
{
static char buf[11];
char c, *s;
int n;