Avoid pointer arithmetic on void pointer.

* src/gpgme.c (gpgme_io_writen): Use new var buffer.
--

Reported-by: Albert Chin
This commit is contained in:
Werner Koch 2014-03-11 13:58:38 +01:00
parent 75a6255935
commit dd9c8c5671

View File

@ -691,8 +691,9 @@ gpgme_io_write (int fd, const void *buffer, size_t count)
written or an error is return. Returns: 0 on success or -1 on
error and the sets errno. */
int
gpgme_io_writen (int fd, const void *buffer, size_t count)
gpgme_io_writen (int fd, const void *buffer_arg, size_t count)
{
const char *buffer = buffer_arg;
int ret = 0;
TRACE_BEG2 (DEBUG_GLOBAL, "gpgme_io_writen", fd,
"buffer=%p, count=%u", buffer, count);