diff options
author | gabor <gabor@FreeBSD.org> | 2011-10-11 22:27:23 +0000 |
---|---|---|
committer | gabor <gabor@FreeBSD.org> | 2011-10-11 22:27:23 +0000 |
commit | afe335edb5ec5cb5b15074c5f300c5055f76f73b (patch) | |
tree | 6864876fce7349bb828446411f1b587ad7e18e64 /usr.bin/grep/regex/tre-fastmatch.c | |
parent | 2a4bf1ea8bf0f83e7562db32f157e58bef2cf214 (diff) | |
download | FreeBSD-src-afe335edb5ec5cb5b15074c5f300c5055f76f73b.zip FreeBSD-src-afe335edb5ec5cb5b15074c5f300c5055f76f73b.tar.gz |
- Use getprogname() instead of __progname
- Allow disabling bzip2 support with WITHOUT_BZIP2
- Fix handling patterns that start with a dot
- Remove superfluous semicolon
Approved by: delphij (mentor)
Diffstat (limited to 'usr.bin/grep/regex/tre-fastmatch.c')
-rw-r--r-- | usr.bin/grep/regex/tre-fastmatch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/grep/regex/tre-fastmatch.c b/usr.bin/grep/regex/tre-fastmatch.c index e6a35ff..6f1aec6 100644 --- a/usr.bin/grep/regex/tre-fastmatch.c +++ b/usr.bin/grep/regex/tre-fastmatch.c @@ -1,4 +1,4 @@ -/* $FreeBSD$ */ +/* $FreeBSD$ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -548,7 +548,7 @@ tre_compile_fast(fastmatch_t *fg, const tre_char_t *pat, size_t n, int cflags) { tre_char_t *tmp; - size_t pos = 0, hasdot = 0, whasdot = 0;; + size_t pos = 0, hasdot = 0, whasdot = 0; ssize_t firstdot = -1, wfirstdot = -1; bool escaped = false; bool *_escmap = NULL; @@ -694,7 +694,7 @@ badpat: return REG_BADPAT; } - fg->hasdot = whasdot; + fg->hasdot = wfirstdot > -1; /* * The pattern has been processed and copied to tmp as a literal string |