summaryrefslogtreecommitdiffhomepage
path: root/miscutils/less.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-09-16 13:16:01 +0000
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-09-16 13:16:01 +0000
commit8d3c40d492a13131d14aa8d79787e0fa98f6be85 (patch)
treed9acab479d786e2c8e00445ff73565988494d1c5 /miscutils/less.c
parent38013e394f1d5b9199abf2f8507c96585ced6f8c (diff)
more C-compatibily, Thanks Bernhard Fischer
Diffstat (limited to 'miscutils/less.c')
-rw-r--r--miscutils/less.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index 99149a51d..d7898caab 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -670,9 +670,10 @@ static char *process_regex_on_line(char *line, regex_t *pattern) {
char *line2 = (char *) malloc((sizeof(char) * (strlen(line) + 1)) + 64);
char sub_line[256];
int prev_eo = 0;
+ regmatch_t match_structs;
+
memset(sub_line, 0, 256);
strcpy(line2, line);
- regmatch_t match_structs;
match_found = 0;
match_status = regexec(pattern, line2, 1, &match_structs, 0);