summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/common/ctf/ctf_create.c4
-rw-r--r--usr/src/lib/libctf/common/ctf_elfwrite.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/usr/src/common/ctf/ctf_create.c b/usr/src/common/ctf/ctf_create.c
index c0a4b15055..355165eb12 100644
--- a/usr/src/common/ctf/ctf_create.c
+++ b/usr/src/common/ctf/ctf_create.c
@@ -1986,7 +1986,7 @@ ctf_add_function(ctf_file_t *fp, ulong_t idx, const ctf_funcinfo_t *fip,
if (ctf_dsd_lookup(fp, idx) != NULL)
return (ctf_set_errno(fp, ECTF_CONFLICT));
- if (symbase == NULL)
+ if (symbase == (uintptr_t)NULL)
return (ctf_set_errno(fp, ECTF_STRTAB));
if (idx > fp->ctf_nsyms)
@@ -2053,7 +2053,7 @@ ctf_add_object(ctf_file_t *fp, ulong_t idx, ctf_id_t type)
if (ctf_dsd_lookup(fp, idx) != NULL)
return (ctf_set_errno(fp, ECTF_CONFLICT));
- if (symbase == NULL)
+ if (symbase == (uintptr_t)NULL)
return (ctf_set_errno(fp, ECTF_STRTAB));
if (idx > fp->ctf_nsyms)
diff --git a/usr/src/lib/libctf/common/ctf_elfwrite.c b/usr/src/lib/libctf/common/ctf_elfwrite.c
index 7f668fe528..dfefbf6861 100644
--- a/usr/src/lib/libctf/common/ctf_elfwrite.c
+++ b/usr/src/lib/libctf/common/ctf_elfwrite.c
@@ -68,7 +68,7 @@ ctf_write_elf(ctf_file_t *fp, Elf *src, Elf *dst, int flags)
goto out;
}
- if (gelf_newehdr(dst, gelf_getclass(src)) == NULL) {
+ if (gelf_newehdr(dst, gelf_getclass(src)) == 0) {
ret = ctf_set_errno(fp, ECTF_ELF);
goto out;
}
@@ -108,7 +108,7 @@ ctf_write_elf(ctf_file_t *fp, Elf *src, Elf *dst, int flags)
*/
if (nphdr != 0) {
(void) elf_flagelf(dst, ELF_C_SET, ELF_F_LAYOUT);
- if (gelf_newphdr(dst, nphdr) == NULL) {
+ if (gelf_newphdr(dst, nphdr) == 0) {
ret = ctf_set_errno(fp, ECTF_ELF);
goto out;
}
@@ -266,7 +266,7 @@ ctf_write_elf(ctf_file_t *fp, Elf *src, Elf *dst, int flags)
}
}
- if (gelf_update_shdr(dscn, &shdr) == NULL) {
+ if (gelf_update_shdr(dscn, &shdr) == 0) {
ret = ctf_set_errno(fp, ECTF_ELF);
goto out;
}
@@ -351,7 +351,7 @@ ctf_write_elf(ctf_file_t *fp, Elf *src, Elf *dst, int flags)
dehdr.e_shstrndx = SHN_XINDEX;
else
dehdr.e_shstrndx = secxlate[sehdr.e_shstrndx];
- if (gelf_update_ehdr(dst, &dehdr) == NULL) {
+ if (gelf_update_ehdr(dst, &dehdr) == 0) {
ret = ctf_set_errno(fp, ECTF_ELF);
goto out;
}