1
1

hwloc/base: fix opal_output() usage

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
Gilles Gouaillardet 2017-08-23 10:24:47 +09:00
родитель 8273cea9d6
Коммит 565b516dae

Просмотреть файл

@ -314,14 +314,14 @@ int opal_hwloc_base_get_topology(void)
FILE *file = fopen("/proc/self/maps", "r"); FILE *file = fopen("/proc/self/maps", "r");
if (file) { if (file) {
char line[256]; char line[256];
opal_output(0, opal_hwloc_base_framework.framework_output, opal_output(opal_hwloc_base_framework.framework_output,
"Dumping /proc/self/maps"); "Dumping /proc/self/maps");
while (fgets(line, sizeof(line), file) != NULL) { while (fgets(line, sizeof(line), file) != NULL) {
char *end = strchr(line, '\n'); char *end = strchr(line, '\n');
if (end) if (end)
*end = '\0'; *end = '\0';
opal_output(0, opal_hwloc_base_framework.framework_output, opal_output(opal_hwloc_base_framework.framework_output,
"%s", line); line);
} }
fclose(file); fclose(file);
} }