diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2003-10-31 18:32:15 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2003-10-31 18:32:15 +0000 |
| commit | 9bf40ede4a299f315bc4b0ae5329631b8c7dc271 (patch) | |
| tree | 4d9e6671d486576767506230a4240131526fea49 /usr.sbin | |
| parent | dc6279b887bf4473d77b898631f74466b5f7a094 (diff) | |
Notes
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/ifmcstat/ifmcstat.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/usr.sbin/ifmcstat/ifmcstat.c b/usr.sbin/ifmcstat/ifmcstat.c index 72806ac3bee89..bde4a4c8a4d17 100644 --- a/usr.sbin/ifmcstat/ifmcstat.c +++ b/usr.sbin/ifmcstat/ifmcstat.c @@ -150,9 +150,7 @@ char *ifname(ifp) char ifnamebuf[IFNAMSIZ]; KREAD(ifp, &ifnet, struct ifnet); - KREAD(ifnet.if_name, ifnamebuf, sizeof(ifnamebuf)); - snprintf(buf, sizeof(buf), "%s%d", ifnamebuf, - ifnet.if_unit); /* does snprintf allow overlap copy?? */ + strlcpy(buf, ifnet.if_xname, sizeof(buf)); return buf; } |
