diff options
author | Peter Stephenson <pws@zsh.org> | 2016-07-20 09:45:37 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2016-07-20 09:45:37 +0100 |
commit | 317494e9985590bbf975f934c0f1425596744939 (patch) | |
tree | d6faf739f85fcd65f2f577d82961ce6f3e98eed0 | |
parent | 6e966f691d588932cde025083fa91575f661119a (diff) | |
download | zsh-317494e9985590bbf975f934c0f1425596744939.tar.gz zsh-317494e9985590bbf975f934c0f1425596744939.tar.xz zsh-317494e9985590bbf975f934c0f1425596744939.zip |
38853: use strchr()
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Src/glob.c | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog index bdcfd6f6b..8582acb0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-07-20 Peter Stephenson <p.stephenson@samsung.com> + + * 38853: Src/glob.c: use strchr(). + 2016-07-20 Daniel Shahaf <d.s@daniel.shahaf.name> * users/21777: Doc/Zsh/expn.yo: Clarify documentation of the diff --git a/Src/glob.c b/Src/glob.c index 146b4dbbc..850405fd4 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -1922,13 +1922,7 @@ zglob(LinkList list, LinkNode np, int nountok) */ for (gmptr = matchbuf; gmptr < matchptr; gmptr++) { - char *nptr; - for (nptr = gmptr->name; *nptr; nptr++) - { - if (*nptr == Meta) - break; - } - if (*nptr == Meta) + if (strchr(gmptr->name, Meta)) { int dummy; gmptr->uname = dupstring(gmptr->name); |