diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-05 12:06:21 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-05 12:06:21 +0000 |
commit | 04118530d4157d3494349e2628246b78465e08f8 (patch) | |
tree | ba64a66a1a87fc43d50ca0352cad316ce9362094 /Src/Zle/compcore.c | |
parent | 057e9700ecb3c5fce374d0afc208798b4f345ee2 (diff) | |
download | zsh-04118530d4157d3494349e2628246b78465e08f8.tar.gz zsh-04118530d4157d3494349e2628246b78465e08f8.tar.xz zsh-04118530d4157d3494349e2628246b78465e08f8.zip |
some more memory initialisation after allocation; shouldn't possibly have done any harm (11193)
Diffstat (limited to 'Src/Zle/compcore.c')
-rw-r--r-- | Src/Zle/compcore.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 542c5eebc..e04973b0a 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -2339,13 +2339,14 @@ begcmgroup(char *n, int flags) } mgroup = (Cmgroup) zhalloc(sizeof(struct cmgroup)); mgroup->name = dupstring(n); - mgroup->lcount = mgroup->llcount = mgroup->mcount = 0; + mgroup->lcount = mgroup->llcount = mgroup->mcount = mgroup->ecount = + mgroup->ccount = 0; mgroup->flags = flags; mgroup->matches = NULL; mgroup->ylist = NULL; mgroup->expls = NULL; mgroup->perm = NULL; - mgroup->new = 0; + mgroup->new = mgroup->num = mgroup->nbrbeg = mgroup->nbrend = 0; mgroup->lexpls = expls = newlinklist(); mgroup->lmatches = matches = newlinklist(); @@ -2353,7 +2354,9 @@ begcmgroup(char *n, int flags) mgroup->lallccs = allccs = ((flags & CGF_NOSORT) ? NULL : newlinklist()); - mgroup->next = amatches; + if ((mgroup->next = amatches)) + amatches->prev = mgroup; + mgroup->prev = NULL; amatches = mgroup; } @@ -2713,6 +2716,7 @@ permmatches(int last) for (eq = g->expls; (o = *eq); eq++, ep++) { *ep = e = (Cexpl) zcalloc(sizeof(struct cexpl)); e->count = (fi ? o->fcount : o->count); + e->fcount = 0; e->str = ztrdup(o->str); } *ep = NULL; |