summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/route.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2000-03-14 01:46:54 +0000
committerbrian <brian@FreeBSD.org>2000-03-14 01:46:54 +0000
commitc905df5091647a7076a6c9da188e3098e8d9cd1c (patch)
treea9ddb1687fccd6cf0e8e107fd15255251a137904 /usr.sbin/ppp/route.c
parent3b65c00f328daf0fc8db68d8f715a571e8c6e184 (diff)
downloadFreeBSD-src-c905df5091647a7076a6c9da188e3098e8d9cd1c.zip
FreeBSD-src-c905df5091647a7076a6c9da188e3098e8d9cd1c.tar.gz
When ppp can't identify the relevant name, don't use "???", use
<nnn> or <0xxxx> instead.
Diffstat (limited to 'usr.sbin/ppp/route.c')
-rw-r--r--usr.sbin/ppp/route.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c
index cd601e9..1ae43df 100644
--- a/usr.sbin/ppp/route.c
+++ b/usr.sbin/ppp/route.c
@@ -300,13 +300,13 @@ Index2Nam(int idx)
if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0) {
log_Printf(LogERROR, "Index2Nam: sysctl: estimate: %s\n",
strerror(errno));
- return "???";
+ return NumStr(idx, NULL, 0);
}
if ((buf = malloc(needed)) == NULL)
- return "???";
+ return NumStr(idx, NULL, 0);
if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) {
free(buf);
- return "???";
+ return NumStr(idx, NULL, 0);
}
end = buf + needed;
@@ -334,7 +334,7 @@ Index2Nam(int idx)
ifs = NULL;
}
free(buf);
- return "???";
+ return NumStr(idx, NULL, 0);
}
ifs = newifs;
memset(ifs + had, '\0', sizeof(char *) * (have - had));
@@ -364,7 +364,7 @@ Index2Nam(int idx)
}
if (idx < 1 || idx > nifs || ifs[idx-1] == NULL)
- return "???";
+ return NumStr(idx, NULL, 0);
return ifs[idx-1];
}
OpenPOWER on IntegriCloud