diff options
author | gabor <gabor@FreeBSD.org> | 2010-07-29 00:11:14 +0000 |
---|---|---|
committer | gabor <gabor@FreeBSD.org> | 2010-07-29 00:11:14 +0000 |
commit | d3f9c5a1b7e9d966652b4c688f2558356eb149d3 (patch) | |
tree | 1e1d5961f5ee38199f4b4fbd83cfffc86339e1c5 /usr.bin/grep/queue.c | |
parent | 1e88e37ddc5c0145f7fc505a213d255161668879 (diff) | |
download | FreeBSD-src-d3f9c5a1b7e9d966652b4c688f2558356eb149d3.zip FreeBSD-src-d3f9c5a1b7e9d966652b4c688f2558356eb149d3.tar.gz |
- Use the traditional behaviour for filename and directory name inclusion
and exclusion patterns [1]
- Some improvements on the exiting code, like replacing memcpy with
strlcpy/strcpy
Approved by: delphij (mentor)
Pointed out by: bf [1], des [1]
Diffstat (limited to 'usr.bin/grep/queue.c')
-rw-r--r-- | usr.bin/grep/queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/grep/queue.c b/usr.bin/grep/queue.c index dcef7f8..29a6c2f 100644 --- a/usr.bin/grep/queue.c +++ b/usr.bin/grep/queue.c @@ -60,7 +60,7 @@ enqueue(struct str *x) item->data.len = x->len; item->data.line_no = x->line_no; item->data.off = x->off; - memcpy(item->data.dat, x->dat, x->len); + strcpy(item->data.dat, x->dat); item->data.file = x->file; STAILQ_INSERT_TAIL(&queue, item, list); |