rtsp: clear the entire builder structure
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 31 Mar 2009 17:13:19 +0000 (18:13 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 31 Mar 2009 17:30:48 +0000 (18:30 +0100)
And use structure instead of variable with sizeof when
clearing the rtsp message structure, for clarity.

gst-libs/gst/rtsp/gstrtspconnection.c
gst-libs/gst/rtsp/gstrtspmessage.c

index c9bcea0..4ae4a80 100644 (file)
@@ -239,7 +239,7 @@ static void
 build_reset (GstRTSPBuilder * builder)
 {
   g_free (builder->body_data);
-  memset (builder, 0, sizeof (builder));
+  memset (builder, 0, sizeof (GstRTSPBuilder));
 }
 
 /**
index b4d2e96..a6aa921 100644 (file)
@@ -463,7 +463,7 @@ gst_rtsp_message_unset (GstRTSPMessage * msg)
   }
   g_free (msg->body);
 
-  memset (msg, 0, sizeof *msg);
+  memset (msg, 0, sizeof (GstRTSPMessage));
 
   return GST_RTSP_OK;
 }