Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 360013 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/librc/librc.c (-6 / +6 lines)
Lines 550-563 rc_service_extra_commands(const char *service) Link Here
550
	if ((fp = popen(cmd, "r"))) {
550
	if ((fp = popen(cmd, "r"))) {
551
		rc_getline(&buffer, &len, fp);
551
		rc_getline(&buffer, &len, fp);
552
		p = buffer;
552
		p = buffer;
553
		while ((token = strsep(&p, " "))) {
553
		commands = rc_stringlist_new();
554
			if (!commands)
554
555
				commands = rc_stringlist_new();
555
		while ((token = strsep(&p, " ")))
556
			rc_stringlist_add(commands, token);
556
			if (token[0] != '\0') rc_stringlist_add(commands, token);
557
		}
557
558
		pclose(fp);
558
		pclose(fp);
559
		free(buffer);
559
		free(buffer);
560
	}
560
	}
561
561
	free(cmd);
562
	free(cmd);
562
	return commands;
563
	return commands;
563
}
564
}
564
- 

Return to bug 360013