aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/tools/ctf/common/utils.c
diff options
context:
space:
mode:
authorZhenlei Huang <zlei@FreeBSD.org>2023-02-23 16:28:35 +0000
committerZhenlei Huang <zlei@FreeBSD.org>2023-03-02 08:12:15 +0000
commit83d88726ce267979e320e03270710d11e4f210d9 (patch)
tree02a1a7e046f2a1152141bd57fdfcd0d197e93daa /cddl/contrib/opensolaris/tools/ctf/common/utils.c
parentaa330214cf1daacfdf706d12c01a34dc2f862693 (diff)
downloadsrc-83d88726ce267979e320e03270710d11e4f210d9.tar.gz
src-83d88726ce267979e320e03270710d11e4f210d9.zip
ctfdump: Use getprogname()
Also remove no longer used function `getpname()`. Reviewed by: markj Approved by: re (delphij) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38740 (cherry picked from commit 3dd5524264095ed8612c28908e13f80668eff2f9) (cherry picked from commit 994eb2fb8a901c883f2bd24fa29c6cd513cb4340) ctf: Remove unused function prototype for getpname() (cherry picked from commit f8e1aa85fed08d5f689cb36d65a76d191f6500dd) (cherry picked from commit eba26d0ba37e647572b3ec285352f778ef0ec9f0)
Diffstat (limited to 'cddl/contrib/opensolaris/tools/ctf/common/utils.c')
-rw-r--r--cddl/contrib/opensolaris/tools/ctf/common/utils.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/common/utils.c b/cddl/contrib/opensolaris/tools/ctf/common/utils.c
index f74eb8de40fa..fda29486d94b 100644
--- a/cddl/contrib/opensolaris/tools/ctf/common/utils.c
+++ b/cddl/contrib/opensolaris/tools/ctf/common/utils.c
@@ -35,30 +35,6 @@
/*LINTLIBRARY*/
-static const char *pname;
-
-#pragma init(getpname)
-const char *
-getpname(void)
-{
- const char *p, *q;
-
- if (pname != NULL)
- return (pname);
-
- if ((p = getexecname()) != NULL)
- q = strrchr(p, '/');
- else
- q = NULL;
-
- if (q == NULL)
- pname = p;
- else
- pname = q + 1;
-
- return (pname);
-}
-
void
vdie(const char *format, va_list alist)
{