summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/command.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2001-08-20 15:09:34 +0000
committerBrian Somers <brian@FreeBSD.org>2001-08-20 15:09:34 +0000
commit2313781df23654556cd7d08ca63c3fc184ef1b63 (patch)
treee4cd080245144f4b39a65872690adec1ed0c8bda /usr.sbin/ppp/command.c
parentf0183cc46aa18095dea6ce4d9b52acd69836baca (diff)
Notes
Diffstat (limited to 'usr.sbin/ppp/command.c')
-rw-r--r--usr.sbin/ppp/command.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 36cd8edf3b0a..ae68eec0701f 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -263,7 +263,11 @@ IdentCommand(struct cmdargs const *arg)
for (pos = 0, f = arg->argn; f < arg->argc && pos < max; f++) {
n = snprintf(arg->cx->physical->link.lcp.cfg.ident + pos, max - pos,
"%s%s", f == arg->argn ? "" : " ", arg->argv[f]);
- if (n == -1 || (pos += n) >= max)
+ if (n < 0) {
+ arg->cx->physical->link.lcp.cfg.ident[pos] = '\0';
+ break;
+ }
+ if ((pos += n) >= max)
break;
}