View | Details | Raw Unified | Return to bug 202022
Collapse All | Expand All

(-)b/usr.bin/grep/grep.c (-1 / +1 lines)
Lines 315-321 read_patterns(const char *fn) Link Here
315
	len = 0;
315
	len = 0;
316
	line = NULL;
316
	line = NULL;
317
	while ((rlen = getline(&line, &len, f)) != -1)
317
	while ((rlen = getline(&line, &len, f)) != -1)
318
		add_pattern(line, line[0] == '\n' ? 0 : (size_t)rlen);
318
		add_pattern(line, line[0] == '\0' || line[0] == '\n' ? 0 : (size_t)rlen);
319
	free(line);
319
	free(line);
320
	if (ferror(f))
320
	if (ferror(f))
321
		err(2, "%s", fn);
321
		err(2, "%s", fn);

Return to bug 202022