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
committerJohn Levon <john.levon@joyent.com>2019-05-03 02:15:57 -0700
commit37e82d12edcc0e950e771c6cda32e45f1ecd7f8d (patch)
treecd4ec136222b181615a5cf64e75b4014ecf5236c /usr/src/lib/libctf/common/ctf_convert.c
parent0193495632be916873f94049cb3da876f1b1ae01 (diff)
downloadillumos-gate-37e82d12edcc0e950e771c6cda32e45f1ecd7f8d.tar.gz
10812 ctf tools shouldn't add blank labels
10813 ctf symbol mapping needs work Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Gordon Ross <gordon.w.ross@gmail.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Gordon Ross <gwr@nexenta.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 cbb4d48c76..07396cb8c9 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);