[Spice-devel] [PATCH 1/2] stream: use display_channel_get_stream_id()

Victor Toso victortoso at redhat.com
Thu Jun 29 15:44:03 UTC 2017


From: Victor Toso <me at victortoso.com>

As we have a function for that, don't do the math elsewhere.

Signed-off-by: Victor Toso <victortoso at redhat.com>
---
 server/stream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/stream.c b/server/stream.c
index 838c6436..9a3a82d1 100644
--- a/server/stream.c
+++ b/server/stream.c
@@ -422,7 +422,7 @@ static void display_channel_create_stream(DisplayChannel *display, Drawable *dra
         dcc_create_stream(dcc, stream);
     }
     spice_debug("stream %d %dx%d (%d, %d) (%d, %d) %u fps",
-                (int)(stream - display->priv->streams_buf), stream->width,
+                display_channel_get_stream_id(display, stream), stream->width,
                 stream->height, stream->dest_area.left, stream->dest_area.top,
                 stream->dest_area.right, stream->dest_area.bottom,
                 stream->input_fps);
-- 
2.13.0



More information about the Spice-devel mailing list