aboutsummaryrefslogtreecommitdiffstats
path: root/jnlib/logging.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2008-03-20 15:31:43 +0000
committerWerner Koch <[email protected]>2008-03-20 15:31:43 +0000
commitc2a8254be71089f707b3100972609db9cf4d02a0 (patch)
tree109ea1f31fdfe85524fca8107edbab7a5888f425 /jnlib/logging.c
parentFix for v3 keys. (diff)
downloadgnupg-c2a8254be71089f707b3100972609db9cf4d02a0.tar.gz
gnupg-c2a8254be71089f707b3100972609db9cf4d02a0.zip
Fix a bug in the ambigious name detection.
Minor cleanups.
Diffstat (limited to '')
-rw-r--r--jnlib/logging.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/jnlib/logging.c b/jnlib/logging.c
index 37ae207f3..d4418c915 100644
--- a/jnlib/logging.c
+++ b/jnlib/logging.c
@@ -48,8 +48,10 @@
#ifdef HAVE_FOPENCOOKIE
typedef ssize_t my_funopen_hook_ret_t;
+typedef size_t my_funopen_hook_size_t;
#else
typedef int my_funopen_hook_ret_t;
+typedef int my_funopen_hook_size_t;
#endif
@@ -117,7 +119,7 @@ writen (int fd, const void *buffer, size_t nbytes)
static my_funopen_hook_ret_t
-fun_writer (void *cookie_arg, const char *buffer, size_t size)
+fun_writer (void *cookie_arg, const char *buffer, my_funopen_hook_size_t size)
{
struct fun_cookie_s *cookie = cookie_arg;
@@ -188,7 +190,7 @@ fun_writer (void *cookie_arg, const char *buffer, size_t size)
log_socket = cookie->fd;
if (cookie->fd != -1 && !writen (cookie->fd, buffer, size))
- return size; /* Okay. */
+ return (my_funopen_hook_ret_t)size; /* Okay. */
if (!running_detached && cookie->fd != -1
&& isatty (fileno (stderr)))
@@ -207,7 +209,7 @@ fun_writer (void *cookie_arg, const char *buffer, size_t size)
log_socket = -1;
}
- return size;
+ return (my_funopen_hook_ret_t)size;
}
static int