[vlc-commits] access/satip: replace memset with explicit initialization

Filip Roséen git at videolan.org
Sun Mar 5 23:35:20 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Sun Feb 26 16:56:06 2017 +0100| [fd0b3352c6b3a7ac1989a18da85590d094d151e0] | committer: Jean-Baptiste Kempf

access/satip: replace memset with explicit initialization

It is clearer to initialize the relevant data-member directly than to
use memset on the entire structure.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fd0b3352c6b3a7ac1989a18da85590d094d151e0
---

 modules/access/satip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/access/satip.c b/modules/access/satip.c
index 1f31425..d264bd8 100644
--- a/modules/access/satip.c
+++ b/modules/access/satip.c
@@ -435,7 +435,7 @@ static void *satip_thread(void *data) {
         memset(&msgs[i], 0, sizeof (msgs[i]));
         msgs[i].msg_hdr.msg_iov = &iovecs[i];
         msgs[i].msg_hdr.msg_iovlen = 1;
-        memset(&iovecs[i], 0, sizeof (iovecs[i]));
+        iovecs[i].iov_base = NULL;
         iovecs[i].iov_len = RTSP_RECEIVE_BUFFER;
         input_blocks[i] = NULL;
     }



More information about the vlc-commits mailing list