summaryrefslogtreecommitdiff
path: root/usr/src/lib/libctf/common/ctf_convert.c
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2019-03-12 17:46:42 +0000
committerRobert Mustacchi <rm@joyent.com>2019-03-20 18:52:55 +0000
commitcab8f574b2799281fddf00931d5f96a163272c9a (patch)
treeb7405ee9ef321c6d3c21ed7246c0e31e5a8f99aa /usr/src/lib/libctf/common/ctf_convert.c
parentade6c39b187fff41cf5c7f6bc2b5761c8ee9418a (diff)
downloadillumos-joyent-cab8f574b2799281fddf00931d5f96a163272c9a.tar.gz
OS-7645 ctf symbol mapping needs work
OS-7653 ctf tools shouldn't add blank labels Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: John Levon <john.levon@joyent.com> Approved by: John Levon <john.levon@joyent.com>
Diffstat (limited to 'usr/src/lib/libctf/common/ctf_convert.c')
-rw-r--r--usr/src/lib/libctf/common/ctf_convert.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr/src/lib/libctf/common/ctf_convert.c b/usr/src/lib/libctf/common/ctf_convert.c
index 1a433d17db..7190e66718 100644
--- a/usr/src/lib/libctf/common/ctf_convert.c
+++ b/usr/src/lib/libctf/common/ctf_convert.c
@@ -10,7 +10,7 @@
*/
/*
- * Copyright 2015 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
/*
@@ -168,9 +168,7 @@ ctf_elfconvert(int fd, Elf *elf, const char *label, uint_t nthrs, uint_t flags,
/*
* Succsesful conversion.
*/
- if (fp != NULL) {
- if (label == NULL)
- label = "";
+ if (fp != NULL && label != NULL) {
if (ctf_add_label(fp, label, fp->ctf_typemax, 0) == CTF_ERR) {
*errp = ctf_errno(fp);
ctf_close(fp);