Compare commits

..
2 Commits
Author SHA1 Message Date
Denis Vlasenko de15bb931a apply single post-1.7.4 patch; bump version to 1.7.5 2008-03-21 08:44:32 +00:00
Denis Vlasenko cf24d29529 Apply post-1.7.3 fix to inetd 2007-11-24 04:41:20 +00:00
3 changed files with 13 additions and 6 deletions

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
VERSION = 1
PATCHLEVEL = 7
SUBLEVEL = 3
SUBLEVEL = 5
EXTRAVERSION =
NAME = Unnamed
+11 -4
View File
@@ -154,14 +154,14 @@ static int grep_file(FILE *file)
while ((line = xmalloc_getline(file)) != NULL) {
llist_t *pattern_ptr = pattern_head;
grep_list_data_t * gl;
grep_list_data_t *gl = gl; /* for gcc */
linenum++;
ret = 0;
while (pattern_ptr) {
gl = (grep_list_data_t *)pattern_ptr->data;
if (FGREP_FLAG) {
ret = strstr(line, gl->pattern) != NULL;
ret |= (strstr(line, gl->pattern) != NULL);
} else {
/*
* test for a postitive-assertion match (regexec returns success (0)
@@ -255,8 +255,15 @@ static int grep_file(FILE *file)
print_n_lines_after = lines_after;
#endif
if (option_mask32 & OPT_o) {
line[regmatch.rm_eo] = '\0';
print_line(line + regmatch.rm_so, linenum, ':');
if (FGREP_FLAG) {
/* -Fo just prints the pattern
* (unless -v: -Fov doesnt print anything at all) */
if (ret)
print_line(gl->pattern, linenum, ':');
} else {
line[regmatch.rm_eo] = '\0';
print_line(line + regmatch.rm_so, linenum, ':');
}
} else {
print_line(line, linenum, ':');
}
+1 -1
View File
@@ -760,7 +760,7 @@ static servtab_t *getconfigent(void)
sep->se_bi = NULL;
#endif
argc = 0;
for (; cp; arg = skip(&cp)) {
for (arg = skip(&cp); cp; arg = skip(&cp)) {
if (argc < MAXARGV)
sep->se_argv[argc++] = xxstrdup(arg);
}