[vlc-commits] linsys_hdsdi: remove redundant nul terminator
Rémi Denis-Courmont
git at videolan.org
Thu Feb 5 21:41:00 CET 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Feb 5 21:28:38 2015 +0200| [2e675e526cbb116f024b653b781f6e8f7063b9d7] | committer: Rémi Denis-Courmont
linsys_hdsdi: remove redundant nul terminator
snprintf() always adds a nul terminator (unless the buffer has zero
bytes, obviously).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2e675e526cbb116f024b653b781f6e8f7063b9d7
---
modules/access/linsys/linsys_hdsdi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/modules/access/linsys/linsys_hdsdi.c b/modules/access/linsys/linsys_hdsdi.c
index 457da3c..a6989b7 100644
--- a/modules/access/linsys/linsys_hdsdi.c
+++ b/modules/access/linsys/linsys_hdsdi.c
@@ -661,7 +661,6 @@ static int InitCapture( demux_t *p_demux )
char psz_vdev[MAXLEN];
snprintf( psz_vdev, sizeof(psz_vdev), SDIVIDEO_DEVICE, p_sys->i_link );
- psz_vdev[sizeof(psz_vdev) - 1] = '\0';
if ( (p_sys->i_vfd = vlc_open( psz_vdev, O_RDONLY ) ) < 0 )
{
msg_Err( p_demux, "couldn't open device %s", psz_vdev );
@@ -735,7 +734,6 @@ static int InitCapture( demux_t *p_demux )
char psz_adev[MAXLEN];
snprintf( psz_adev, sizeof(psz_adev), SDIAUDIO_DEVICE, p_sys->i_link );
- psz_adev[sizeof(psz_adev) - 1] = '\0';
if ( (p_sys->i_afd = vlc_open( psz_adev, O_RDONLY ) ) < 0 )
{
msg_Err( p_demux, "couldn't open device %s", psz_adev );
More information about the vlc-commits
mailing list