diff options
author | 2009-02-18 15:50:27 +0000 | |
---|---|---|
committer | 2009-02-18 15:50:27 +0000 | |
commit | 0563d6acb823ee05ce927778b7f95e64b3682b52 (patch) | |
tree | 7820e7cf5ca0766add9a2ab72b3a181823d33c0c /lib/libc | |
parent | Test to show glob bug introduced with POSIX char class support. (diff) | |
download | wireguard-openbsd-0563d6acb823ee05ce927778b7f95e64b3682b52.tar.xz wireguard-openbsd-0563d6acb823ee05ce927778b7f95e64b3682b52.zip |
Add missing braces. This is why we use braces for indented block that
are more than a couple of lines...
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/glob.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index 59c26629659..7c6e8371807 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -1,4 +1,4 @@ -/* $OpenBSD: glob.c,v 1.27 2008/10/01 23:04:13 millert Exp $ */ +/* $OpenBSD: glob.c,v 1.28 2009/02/18 15:50:27 millert Exp $ */ /* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. @@ -786,7 +786,7 @@ match(Char *name, Char *pat, Char *patend) return(0); if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS) ++pat; - while (((c = *pat++) & M_MASK) != M_END) + while (((c = *pat++) & M_MASK) != M_END) { if ((c & M_MASK) == M_CLASS) { int idx = *pat & M_MASK; if (idx < NCCLASSES && @@ -800,6 +800,7 @@ match(Char *name, Char *pat, Char *patend) pat += 2; } else if (c == k) ok = 1; + } if (ok == negate_range) return(0); break; |