mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
Don't do pointer arithmetic on void * (#508602) Patch from Kazuki IWAMOTO
2008-01-15 Alexander Larsson <alexl@redhat.com> * gmemoryinputstream.c: * gmemoryoutputstream.c: Don't do pointer arithmetic on void * (#508602) Patch from Kazuki IWAMOTO svn path=/trunk/; revision=6316
This commit is contained in:
committed by
Alexander Larsson
parent
5fa9ff14a9
commit
a1996e6518
@@ -313,7 +313,7 @@ array_resize (GMemoryOutputStream *ostream,
|
||||
}
|
||||
|
||||
if (size > len)
|
||||
memset (data + len, 0, size - len);
|
||||
memset ((guint8 *)data + len, 0, size - len);
|
||||
|
||||
priv->data = data;
|
||||
priv->len = size;
|
||||
@@ -365,7 +365,7 @@ g_memory_output_stream_write (GOutputStream *stream,
|
||||
only added part of the required memory */
|
||||
count = MIN (count, priv->len - priv->pos);
|
||||
|
||||
dest = priv->data + priv->pos;
|
||||
dest = (guint8 *)priv->data + priv->pos;
|
||||
memcpy (dest, buffer, count);
|
||||
priv->pos += count;
|
||||
|
||||
|
Reference in New Issue
Block a user