diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2022-03-25 10:21:54 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2022-03-25 10:23:37 +0200 |
commit | f60eaa1e0fba0f0debe51a5c5c7c2bb40124eaf7 (patch) | |
tree | b35eef9d611454b49834dfed4248b9652f668841 | |
parent | a6913834d395d6544c2ba1578d6ebd594350b602 (diff) | |
download | rpm-f60eaa1e0fba0f0debe51a5c5c7c2bb40124eaf7.tar.gz |
Set program name centrally from rpmcliInit()
Most of our tools go through rpmcliInit() so take the opportunity
lessen the clutter wrt xsetprogname() calls. No functional changes.
-rw-r--r-- | lib/poptALL.c | 2 | ||||
-rw-r--r-- | rpm.c | 2 | ||||
-rw-r--r-- | rpmbuild.c | 2 | ||||
-rw-r--r-- | rpmdb.c | 2 | ||||
-rw-r--r-- | rpmkeys.c | 2 | ||||
-rw-r--r-- | rpmsign.c | 2 | ||||
-rw-r--r-- | rpmspec.c | 2 | ||||
-rw-r--r-- | tools/rpmdeps.c | 2 | ||||
-rw-r--r-- | tools/rpmgraph.c | 2 | ||||
-rw-r--r-- | tools/rpmlua.c | 2 |
10 files changed, 2 insertions, 18 deletions
diff --git a/lib/poptALL.c b/lib/poptALL.c index ab3241a84..b24c13ed7 100644 --- a/lib/poptALL.c +++ b/lib/poptALL.c @@ -300,6 +300,8 @@ rpmcliInit(int argc, char *const argv[], struct poptOption * optionsTable) int rc; const char *ctx, *execPath; + xsetprogname(argv[0]); + #if defined(ENABLE_NLS) (void) setlocale(LC_ALL, "" ); @@ -70,8 +70,6 @@ int main(int argc, char *argv[]) int ec = 0; int i; - xsetprogname(argv[0]); /* Portability call -- see system.h */ - optCon = rpmcliInit(argc, argv, optionsTable); /* Set the major mode based on argv[0] */ diff --git a/rpmbuild.c b/rpmbuild.c index da51baa9e..de78976ff 100644 --- a/rpmbuild.c +++ b/rpmbuild.c @@ -606,8 +606,6 @@ int main(int argc, char *argv[]) poptContext optCon = NULL; - xsetprogname(argv[0]); /* Portability call -- see system.h */ - optCon = rpmcliInit(argc, argv, optionsTable); /* Args required only when building, let lone --eval etc through */ @@ -94,8 +94,6 @@ int main(int argc, char *argv[]) poptContext optCon = NULL; rpmts ts = NULL; - xsetprogname(argv[0]); /* Portability call -- see system.h */ - optCon = rpmcliInit(argc, argv, optionsTable); if (argc < 2 || poptPeekArg(optCon)) { @@ -49,8 +49,6 @@ int main(int argc, char *argv[]) rpmts ts = NULL; ARGV_const_t args = NULL; - xsetprogname(argv[0]); /* Portability call -- see system.h */ - optCon = rpmcliInit(argc, argv, optionsTable); if (argc < 2) { @@ -188,8 +188,6 @@ int main(int argc, char *argv[]) poptContext optCon = NULL; const char *arg; - xsetprogname(argv[0]); /* Portability call -- see system.h */ - optCon = rpmcliInit(argc, argv, optionsTable); if (argc <= 1) { @@ -116,8 +116,6 @@ int main(int argc, char *argv[]) poptContext optCon; int ec = 0; - xsetprogname(argv[0]); /* Portability call -- see system.h */ - optCon = rpmcliInit(argc, argv, optionsTable); if (rpmcliPipeOutput && initPipe()) diff --git a/tools/rpmdeps.c b/tools/rpmdeps.c index 62dd6d9e0..70796725b 100644 --- a/tools/rpmdeps.c +++ b/tools/rpmdeps.c @@ -80,8 +80,6 @@ main(int argc, char *argv[]) int ec = 1; char buf[BUFSIZ]; - xsetprogname(argv[0]); /* Portability call -- see system.h */ - optCon = rpmcliInit(argc, argv, optionsTable); if (optCon == NULL) goto exit; diff --git a/tools/rpmgraph.c b/tools/rpmgraph.c index e1a7b4d92..cdd113f3a 100644 --- a/tools/rpmgraph.c +++ b/tools/rpmgraph.c @@ -236,8 +236,6 @@ main(int argc, char *argv[]) poptContext optCon; int ec = 0; - xsetprogname(argv[0]); /* Portability call -- see system.h */ - optCon = rpmcliInit(argc, argv, optionsTable); if (optCon == NULL) exit(EXIT_FAILURE); diff --git a/tools/rpmlua.c b/tools/rpmlua.c index 229feb8c8..6ebea5e9c 100644 --- a/tools/rpmlua.c +++ b/tools/rpmlua.c @@ -56,8 +56,6 @@ int main(int argc, char *argv[]) rpmluarl rlcb = NULL; #endif - xsetprogname(argv[0]); - optCon = rpmcliInit(argc, argv, optionsTable); if (optCon == NULL) { |