Skip to content

Commit 73a5667

Browse files
committed
components: fix a warning about unused asprintf return value
Signed-off-by: Brice Goglin <[email protected]>
1 parent a419f7d commit 73a5667

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

hwloc/components.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ static hwloc_dlhandle hwloc_dlopenext(const char *_filename)
9494
{
9595
hwloc_dlhandle handle;
9696
char *filename = NULL;
97-
(void) asprintf(&filename, "%s.so", _filename);
98-
if (!filename)
97+
if (asprintf(&filename, "%s.so", _filename) < 0)
9998
return NULL;
10099
handle = dlopen(filename, RTLD_NOW|RTLD_LOCAL);
101100
free(filename);

0 commit comments

Comments
 (0)