lspci: ignore blank lines

This commit is contained in:
K. Lange 2019-02-04 17:48:17 +09:00
parent 8e190f584d
commit 33866f7623

View File

@ -68,7 +68,7 @@ int main(int argc, char * argv[]) {
while (!feof(f)) {
char line[1024];
fgets(line, 1024, f);
if (line[0] == ' ') {
if (line[0] == ' ' || line[0] == '\n') {
/* Skip; don't care about this information */
continue;
}