aboutsummaryrefslogtreecommitdiffstats
path: root/jnlib/argparse.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2008-05-27 12:03:50 +0000
committerWerner Koch <[email protected]>2008-05-27 12:03:50 +0000
commit138bf2dc1552fe8b8a1da6edcbd9fdcb747a73b9 (patch)
tree2dd4b1c251b4802660287496b4fd688bb4d7e0c5 /jnlib/argparse.c
parentMinor bug fixes and document new gpg-connect-feature. (diff)
downloadgnupg-138bf2dc1552fe8b8a1da6edcbd9fdcb747a73b9.tar.gz
gnupg-138bf2dc1552fe8b8a1da6edcbd9fdcb747a73b9.zip
Fixed segv in gpg-agent (command marktrusted).
Replaced almost all free by xfree. Translation fixes.
Diffstat (limited to '')
-rw-r--r--jnlib/argparse.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/jnlib/argparse.c b/jnlib/argparse.c
index f9958cb89..443a1e77e 100644
--- a/jnlib/argparse.c
+++ b/jnlib/argparse.c
@@ -896,6 +896,8 @@ show_version()
void
usage (int level)
{
+ const char *p;
+
if (!level)
{
fprintf(stderr,"%s %s; %s\n", strusage(11), strusage(13), strusage (14));
@@ -903,7 +905,10 @@ usage (int level)
}
else if (level == 1)
{
- fputs (strusage (40), stderr);
+ p = strusage (40);
+ fputs (p, stderr);
+ if (*p && p[strlen(p)] != '\n')
+ putc ('\n', stderr);
exit (2);
}
else if (level == 2)