Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 133677
Collapse All | Expand All

(-)dcron-2.9/database.c (-2 / +4 lines)
Lines 169-180 Link Here
169
		while (fgets(buf, sizeof(buf), fi) != NULL && --maxLines) {
169
		while (fgets(buf, sizeof(buf), fi) != NULL && --maxLines) {
170
		    CronLine line;
170
		    CronLine line;
171
		    char *ptr = buf;
171
		    char *ptr = buf;
172
		    int len;
172
173
173
		    while (*ptr == ' ' || *ptr == '\t' || *ptr == '\n')
174
		    while (*ptr == ' ' || *ptr == '\t' || *ptr == '\n')
174
			++ptr;
175
			++ptr;
175
176
176
		    if (*ptr)
177
		    len = strlen(ptr);
177
			ptr[strlen(ptr)-1] = 0;
178
		    if (len && ptr[len-1] == '\n')
179
			ptr[--len] = 0;
178
180
179
		    if (*ptr == 0 || *ptr == '#')
181
		    if (*ptr == 0 || *ptr == '#')
180
			continue;
182
			continue;

Return to bug 133677