Skip to content

Commit

Permalink
tests: fix bug in prog_ls not checking return code for smb2_readlink
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
  • Loading branch information
sahlberg committed Oct 6, 2024
1 parent 05eac44 commit d5f492f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/prog_ls.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,11 @@ int main(int argc, char *argv[])
} else {
asprintf(&link, "%s", ent->name);
}
smb2_readlink(smb2, link, buf, 256);
printf(" -> [%s]\n", buf);
if (smb2_readlink(smb2, link, buf, 256) == 0) {
printf(" -> [%s]\n", buf);
} else {
printf(" readlink failed\n");
}
free(link);
}
}
Expand Down

0 comments on commit d5f492f

Please sign in to comment.