Browse Source

Fiex getline() while pxm parsing

Serj Kalichev 10 years ago
parent
commit
ae4b2d850b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pxm.c

+ 2 - 2
pxm.c

@@ -130,8 +130,8 @@ int parse_pxm_config(const char *fname, lub_list_t *pxms, lub_list_t *numas)
 		cpumask_t cpumask;
 
 		ln++; /* Next line */
-		if (getline(&line, &size, file) == 0)
-			break;
+		if (getline(&line, &size, file) <= 0)
+			continue;
 		/* Find comments */
 		str = strchr(line, '#');
 		if (str)