diff options
author | Gabor Kovesdan <gabor@FreeBSD.org> | 2011-10-11 22:27:23 +0000 |
---|---|---|
committer | Gabor Kovesdan <gabor@FreeBSD.org> | 2011-10-11 22:27:23 +0000 |
commit | afbbd357de39f8d6c20a303f000f4cb46cc86739 (patch) | |
tree | 6864876fce7349bb828446411f1b587ad7e18e64 /usr.bin/grep/regex | |
parent | 6aa1145c847382c9c1bc54810c52fc6b25c83181 (diff) | |
download | src-afbbd357de39f8d6c20a303f000f4cb46cc86739.tar.gz src-afbbd357de39f8d6c20a303f000f4cb46cc86739.zip |
- 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)
Notes
Notes:
svn path=/head/; revision=226271
Diffstat (limited to 'usr.bin/grep/regex')
-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 e6a35ff06731..6f1aec6bf3b7 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 |