From 37e82d12edcc0e950e771c6cda32e45f1ecd7f8d Mon Sep 17 00:00:00 2001 From: Robert Mustacchi Date: Tue, 12 Mar 2019 17:46:42 +0000 Subject: 10812 ctf tools shouldn't add blank labels 10813 ctf symbol mapping needs work Reviewed by: Jerry Jelinek Reviewed by: Gordon Ross Reviewed by: Toomas Soome Approved by: Gordon Ross --- usr/src/lib/libctf/common/ctf_convert.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'usr/src/lib/libctf/common/ctf_convert.c') 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); -- cgit v1.2.3