Use static buffer to save source route hostnames.

Approved by: jkh
This commit is contained in:
Yoshinobu Inoue 2000-02-19 16:33:14 +00:00
parent a82a4df889
commit 81edae92ed
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57343
3 changed files with 3 additions and 3 deletions

View File

@ -2507,7 +2507,7 @@ tn(argc, argv)
res0 = res;
af_again:
if (srcroute != 0) {
char hostbuf[BUFSIZ];
static char hostbuf[BUFSIZ];
if (af_error == 0) { /* save intermediate hostnames for retry */
strncpy(hostbuf, hostp, BUFSIZ - 1);

View File

@ -2507,7 +2507,7 @@ tn(argc, argv)
res0 = res;
af_again:
if (srcroute != 0) {
char hostbuf[BUFSIZ];
static char hostbuf[BUFSIZ];
if (af_error == 0) { /* save intermediate hostnames for retry */
strncpy(hostbuf, hostp, BUFSIZ - 1);

View File

@ -2331,7 +2331,7 @@ tn(argc, argv)
res0 = res;
af_again:
if (srcroute != 0) {
char hostbuf[BUFSIZ];
static char hostbuf[BUFSIZ];
if (af_error == 0) { /* save intermediate hostnames for retry */
strncpy(hostbuf, hostp, BUFSIZ - 1);