projects
/
gnupg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c029a18
)
gpg,gpgsm: Simplify wrong_args function.
author
Werner Koch
<wk@gnupg.org>
Wed, 25 Jun 2014 18:25:28 +0000
(20:25 +0200)
committer
Werner Koch
<wk@gnupg.org>
Thu, 26 Jun 2014 15:07:47 +0000
(17:07 +0200)
g10/gpg.c
patch
|
blob
|
history
sm/gpgsm.c
patch
|
blob
|
history
diff --git
a/g10/gpg.c
b/g10/gpg.c
index
47cc851
..
3614201
100644
(file)
--- a/
g10/gpg.c
+++ b/
g10/gpg.c
@@
-1018,10
+1018,8
@@
build_list (const char *text, char letter,
static void
wrong_args( const char *text)
{
- fputs(_("usage: gpg [options] "),stderr);
- fputs(text,stderr);
- putc('\n',stderr);
- g10_exit(2);
+ fprintf (stderr, _("usage: %s [options] %s\n"), GPG_NAME, text);
+ g10_exit(2);
}
diff --git
a/sm/gpgsm.c
b/sm/gpgsm.c
index
92bb806
..
ded3198
100644
(file)
--- a/
sm/gpgsm.c
+++ b/
sm/gpgsm.c
@@
-636,9
+636,7
@@
set_binary (FILE *fp)
static void
wrong_args (const char *text)
{
- fputs (_("usage: gpgsm [options] "), stderr);
- fputs (text, stderr);
- putc ('\n', stderr);
+ fprintf (stderr, _("usage: %s [options] %s\n"), GPGSM_NAME, text);
gpgsm_exit (2);
}