Skip to content

Commit

Permalink
modules: fix can-never-fail comparison
Browse files Browse the repository at this point in the history
Spotted by GCC 11.

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
  • Loading branch information
nickalcock committed Mar 1, 2022
1 parent 1f065d8 commit 21bb81c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libdtrace/dt_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ dt_module_init_elf(dtrace_hdl_t *dtp, dt_module_t *dmp)
int fd, err, bits;
size_t shstrs;

if (!dmp->dm_file) {
if (!dmp->dm_file[0] == '\0') {
dt_dprintf("failed to open ELF file for module %s: "
"no file name known\n", dmp->dm_name);
return dt_set_errno(dtp, EDT_NOTLOADED);
Expand Down

0 comments on commit 21bb81c

Please sign in to comment.