Date: Thu, 31 Dec 2015 18:56:11 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292995 - head/bin/sh Message-ID: <201512311856.tBVIuB6q010658@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Thu Dec 31 18:56:11 2015 New Revision: 292995 URL: https://svnweb.freebsd.org/changeset/base/292995 Log: sh: Reindent expandmeta(). Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Thu Dec 31 18:47:54 2015 (r292994) +++ head/bin/sh/expand.c Thu Dec 31 18:56:11 2015 (r292995) @@ -1028,28 +1028,28 @@ expandmeta(char *pattern, struct arglist 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); + } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512311856.tBVIuB6q010658>