[Spice-devel] [PATCH] Simplify pointer computation
Frediano Ziglio
fziglio at redhat.com
Wed Oct 7 04:25:40 PDT 2015
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/reds_stream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/reds_stream.c b/server/reds_stream.c
index 1a595b2..6dc41ca 100644
--- a/server/reds_stream.c
+++ b/server/reds_stream.c
@@ -326,7 +326,7 @@ RedsStream *reds_stream_new(int socket)
RedsStream *stream;
stream = spice_malloc0(sizeof(RedsStream) + sizeof(RedsStreamPrivate));
- stream->priv = (RedsStreamPrivate *)(((char *)stream) + sizeof(RedsStream));
+ stream->priv = (RedsStreamPrivate *)(stream+1);
stream->priv->info = spice_new0(SpiceChannelEventInfo, 1);
reds_stream_set_socket(stream, socket);
--
2.4.3
More information about the Spice-devel
mailing list