Skip to content

Commit

Permalink
loader: fix warn-unused-result for asprintf()
Browse files Browse the repository at this point in the history
  • Loading branch information
stsp committed Nov 23, 2023
1 parent bb283ec commit 84e36b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fdpp/loader/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ void *FdppKernelLoad(const char *dname, int *len, struct fdpp_bss_list **bss,
char *kname;
void *handle;
struct krnl_hndl *h;
int i, s;
int i, s, rc;

asprintf(&kname, "%s/%s", dname, _S(KRNL_ELFNAME));
rc = asprintf(&kname, "%s/%s", dname, _S(KRNL_ELFNAME));
assert(rc != -1);
handle = elf_open(kname);
if (!handle) {
fprintf(stderr, "failed to open %s\n", kname);
Expand Down

0 comments on commit 84e36b0

Please sign in to comment.