File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,10 @@ int main(int argc, char *argv[])
184184 hwloc_topology_set_all_types_filter (topology , HWLOC_TYPE_FILTER_KEEP_ALL );
185185 hwloc_topology_set_flags (topology , flags );
186186 ret = hwloc_topology_load (topology );
187+ if (ret < 0 ) {
188+ perror ("Couldn't load the topology" );
189+ return EXIT_FAILURE ;
190+ }
187191 if (restrictstring ) {
188192 hwloc_bitmap_t restrictset = hwloc_bitmap_alloc ();
189193 hwloc_bitmap_sscanf (restrictset , restrictstring );
@@ -194,8 +198,6 @@ int main(int argc, char *argv[])
194198 hwloc_bitmap_free (restrictset );
195199 free (restrictstring );
196200 }
197- if (ret < 0 )
198- return EXIT_FAILURE ;
199201 depth = hwloc_topology_get_depth (topology );
200202
201203 while (argc >= 1 ) {
Original file line number Diff line number Diff line change @@ -430,6 +430,10 @@ int main(int argc, char *argv[])
430430 if (err ) return EXIT_FAILURE ;
431431 }
432432 err = hwloc_topology_load (topology );
433+ if (err < 0 ) {
434+ perror ("Couldn't load the topology" );
435+ return EXIT_FAILURE ;
436+ }
433437 if (restrictstring ) {
434438 hwloc_bitmap_t restrictset = hwloc_bitmap_alloc ();
435439 hwloc_bitmap_sscanf (restrictset , restrictstring );
You can’t perform that action at this time.
0 commit comments