summaryrefslogtreecommitdiff
path: root/utils/ldd.c
diff options
context:
space:
mode:
authorKevin Day <thekevinday@gmail.com>2011-03-30 04:51:22 -0700
committerKhem Raj <raj.khem@gmail.com>2011-03-30 04:53:36 -0700
commit85f4b028d767fc390a7b866d2f58d58be489242d (patch)
tree9a0b9f7dc2b0cf0b9c8086ab0af47dce0f9eb3d0 /utils/ldd.c
parent9b5df2295b4a3cfc63a15b6490f2b61dcf7c1be9 (diff)
utils/ldd: Check for returned pointer from strrchr not the value it holds
Signed-off-by: Kevin Day <thekevinday@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'utils/ldd.c')
-rw-r--r--utils/ldd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/ldd.c b/utils/ldd.c
index 3858c815c..904075c23 100644
--- a/utils/ldd.c
+++ b/utils/ldd.c
@@ -553,7 +553,7 @@ static struct library *find_elf_interpreter(ElfW(Ehdr) *ehdr)
interp_name = strdup(s);
interp_dir = strdup(s);
tmp = strrchr(interp_dir, '/');
- if (*tmp)
+ if (tmp)
*tmp = '\0';
else {
free(interp_dir);