diff options
author | jilles <jilles@FreeBSD.org> | 2015-12-31 18:56:11 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-12-31 18:56:11 +0000 |
commit | 249aea4a20095ca1b8ddd14c3bb95fd4236babcb (patch) | |
tree | 6b3ae76fc5add6ad2e21b34afdd52d94d47d6cd3 /bin | |
parent | e4f897d527982c994f29593631ee908a72b278e4 (diff) | |
download | FreeBSD-src-249aea4a20095ca1b8ddd14c3bb95fd4236babcb.zip FreeBSD-src-249aea4a20095ca1b8ddd14c3bb95fd4236babcb.tar.gz |
sh: Reindent expandmeta().
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/expand.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c index 70280a1..6d5819d 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -1028,28 +1028,28 @@ expandmeta(char *pattern, struct arglist *dstlist) int firstmatch; char c; - firstmatch = dstlist->count; - p = pattern; - for (; (c = *p) != '\0'; p++) { - /* fast check for meta chars */ - if (c == '*' || c == '?' || c == '[') { - INTOFF; - expmeta(expdir, pattern, dstlist); - INTON; - break; - } - } - if (dstlist->count == firstmatch) { - /* - * no matches - */ - rmescapes(pattern); - appendarglist(dstlist, pattern); - } else { - qsort(&dstlist->args[firstmatch], - dstlist->count - firstmatch, - sizeof(dstlist->args[0]), expsortcmp); + firstmatch = dstlist->count; + p = pattern; + for (; (c = *p) != '\0'; p++) { + /* fast check for meta chars */ + if (c == '*' || c == '?' || c == '[') { + INTOFF; + expmeta(expdir, pattern, dstlist); + INTON; + break; } + } + if (dstlist->count == firstmatch) { + /* + * no matches + */ + rmescapes(pattern); + appendarglist(dstlist, pattern); + } else { + qsort(&dstlist->args[firstmatch], + dstlist->count - firstmatch, + sizeof(dstlist->args[0]), expsortcmp); + } } |