summaryrefslogtreecommitdiffstats
path: root/bin/sh/expand.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2015-12-31 18:56:11 +0000
committerjilles <jilles@FreeBSD.org>2015-12-31 18:56:11 +0000
commit249aea4a20095ca1b8ddd14c3bb95fd4236babcb (patch)
tree6b3ae76fc5add6ad2e21b34afdd52d94d47d6cd3 /bin/sh/expand.c
parente4f897d527982c994f29593631ee908a72b278e4 (diff)
downloadFreeBSD-src-249aea4a20095ca1b8ddd14c3bb95fd4236babcb.zip
FreeBSD-src-249aea4a20095ca1b8ddd14c3bb95fd4236babcb.tar.gz
sh: Reindent expandmeta().
Diffstat (limited to 'bin/sh/expand.c')
-rw-r--r--bin/sh/expand.c42
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);
+ }
}
OpenPOWER on IntegriCloud