diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2017-01-30 22:11:53 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2017-01-30 22:11:53 +0000 |
commit | 450aba5b34d82f38f995ef6ed3821466ddfda939 (patch) | |
tree | 41b265aadae8fac50c18e8bc434a15f3a65b1760 /lib/libedit/tokenizer.c | |
parent | 4e02badb1827514af03d7ca781d2c3c2b4e604eb (diff) | |
parent | 4593a7cde52b7d8dae0d524a1bb89fee1bdc11a0 (diff) |
MFV r312996:
Re-import libedit 2016-02-27
This reverts r296435: the issues related to lldb and this update appear to
have been identified (in lldb).
Obtained from: NetBSD
Reported by: emaste
MFC after: 3 weeks
Notes
Notes:
svn path=/head/; revision=312997
Diffstat (limited to 'lib/libedit/tokenizer.c')
-rw-r--r-- | lib/libedit/tokenizer.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libedit/tokenizer.c b/lib/libedit/tokenizer.c index f5171c46d2ec..23f940ff866a 100644 --- a/lib/libedit/tokenizer.c +++ b/lib/libedit/tokenizer.c @@ -1,4 +1,4 @@ -/* $NetBSD: tokenizer.c,v 1.22 2016/01/30 04:02:51 christos Exp $ */ +/* $NetBSD: tokenizer.c,v 1.24 2016/02/17 19:47:49 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)tokenizer.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: tokenizer.c,v 1.22 2016/01/30 04:02:51 christos Exp $"); +__RCSID("$NetBSD: tokenizer.c,v 1.24 2016/02/17 19:47:49 christos Exp $"); #endif #endif /* not lint && not SCCSID */ #include <sys/cdefs.h> @@ -47,8 +47,9 @@ __FBSDID("$FreeBSD$"); /* * tokenize.c: Bourne shell like tokenizer */ -#include <string.h> #include <stdlib.h> +#include <string.h> + #include "histedit.h" #include "chartype.h" @@ -415,8 +416,10 @@ FUN(tok,line)(TYPE(Tokenizer) *tok, const TYPE(LineInfo) *line, Char **p; tok->amax += AINCR; p = tok_realloc(tok->argv, tok->amax * sizeof(*p)); - if (p == NULL) + if (p == NULL) { + tok->amax -= AINCR; return -1; + } tok->argv = p; } } |