From: Philippe Gerum <[email protected]>
Signed-off-by: Philippe Gerum <[email protected]>
---
lib/boilerplate/setup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/boilerplate/setup.c b/lib/boilerplate/setup.c
index 3214d7f04..5139560e8 100644
--- a/lib/boilerplate/setup.c
+++ b/lib/boilerplate/setup.c
@@ -178,7 +178,7 @@ static int collect_cpu_affinity(const char *cpu_list)
s = n = strdup(cpu_list);
while ((range = strtok_r(n, ",", &range_p)) != NULL) {
if (*range == '\0')
- continue;
+ goto next;
end = -1;
if (range[strlen(range)-1] == '-')
end = nr_cpus - 1;
@@ -203,6 +203,7 @@ static int collect_cpu_affinity(const char *cpu_list)
}
for (cpu = start; cpu <= end; cpu++)
CPU_SET(cpu, &__base_setup_data.cpu_affinity);
+ next:
n = NULL;
}
--
2.24.1