aboutsummaryrefslogtreecommitdiffstats
path: root/jnlib/logging.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-07-07 16:51:33 +0000
committerWerner Koch <[email protected]>2009-07-07 16:51:33 +0000
commit44add1c310cd4a8523a11fdc481c8b1b39344ef3 (patch)
tree96b41e30e843ecc7a939b1fadeeaff06d0654fb0 /jnlib/logging.c
parentRelease session_env. (diff)
downloadgnupg-44add1c310cd4a8523a11fdc481c8b1b39344ef3.tar.gz
gnupg-44add1c310cd4a8523a11fdc481c8b1b39344ef3.zip
Minor bug fixes.
Enhanced function docs.
Diffstat (limited to '')
-rw-r--r--jnlib/logging.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/jnlib/logging.c b/jnlib/logging.c
index 6267dc11c..028697b78 100644
--- a/jnlib/logging.c
+++ b/jnlib/logging.c
@@ -267,6 +267,9 @@ set_file_fd (const char *name, int fd)
/* Setup a new stream. */
#ifdef USE_FUNWRITER
+ /* The xmalloc below is justified because we can expect that this
+ function is called only during initialization and there is no
+ easy way out of this error condition. */
cookie = jnlib_xmalloc (sizeof *cookie + (name? strlen (name):0));
strcpy (cookie->name, name? name:"");
cookie->quiet = 0;