[MPlayer-dev-eng] [PATCH] bzero to memset

Gianluigi Tiesi mplayer at netfarm.it
Sat Jan 22 03:43:11 CET 2005


Updated patch for new cvs...

-- 
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/
-------------- next part --------------
diff -NubBr -xCVS -xhelp_mp.h -xGui -x'*.a' -x'*.exe' -x'*.o' -xconfigure.log -xconfig.mak -x.cvsignore -x'*.ini' -xconfig.h -xcodecs.conf.h -xversion.h -x.depend main/libao2/ao_macosx.c sherpya/libao2/ao_macosx.c
--- main/libao2/ao_macosx.c	2005-01-14 20:36:48.135724800 +0100
+++ sherpya/libao2/ao_macosx.c	2005-01-21 10:46:44.682062400 +0100
@@ -460,7 +460,7 @@
   
   /* zero output buffer */
   for (i = 0; i < NUM_BUFS; i++)
-    bzero(ao->buffer[i], ao->buffer_len);
+    memset(ao->buffer[i], 0, ao->buffer_len);
 
   pthread_mutex_unlock(&ao->buffer_mutex);
        
diff -NubBr -xCVS -xhelp_mp.h -xGui -x'*.a' -x'*.exe' -x'*.o' -xconfigure.log -xconfig.mak -x.cvsignore -x'*.ini' -xconfig.h -xcodecs.conf.h -xversion.h -x.depend main/libmpcodecs/native/RTjpegN.c sherpya/libmpcodecs/native/RTjpegN.c
--- main/libmpcodecs/native/RTjpegN.c	2004-12-04 23:59:25.000000000 +0100
+++ sherpya/libmpcodecs/native/RTjpegN.c	2005-01-21 10:47:12.972742400 +0100
@@ -3138,7 +3138,7 @@
   fprintf(stderr, "RTjpeg: Could not allocate memory\n");
   exit(-1);
  }
- bzero(RTjpeg_old, ((4*RTjpeg_width*RTjpeg_height)));
+ memset(RTjpeg_old, 0, ((4*RTjpeg_width*RTjpeg_height)));
 }
 
 #ifdef MMX
diff -NubBr -xCVS -xhelp_mp.h -xGui -x'*.a' -x'*.exe' -x'*.o' -xconfigure.log -xconfig.mak -x.cvsignore -x'*.ini' -xconfig.h -xcodecs.conf.h -xversion.h -x.depend main/libmpcodecs/vd_theora.c sherpya/libmpcodecs/vd_theora.c
--- main/libmpcodecs/vd_theora.c	2004-12-04 23:59:20.000000000 +0100
+++ sherpya/libmpcodecs/vd_theora.c	2005-01-21 10:47:23.828352000 +0100
@@ -139,7 +139,7 @@
    mp_image_t* mpi;
    int i;
 
-   bzero (&op, sizeof (op));
+   memset (&op, 0, sizeof (op));
    op.bytes = len;
    op.packet = data;
    op.granulepos = -1;
diff -NubBr -xCVS -xhelp_mp.h -xGui -x'*.a' -x'*.exe' -x'*.o' -xconfigure.log -xconfig.mak -x.cvsignore -x'*.ini' -xconfig.h -xcodecs.conf.h -xversion.h -x.depend main/libmpdemux/demux_ts.c sherpya/libmpdemux/demux_ts.c
--- main/libmpdemux/demux_ts.c	2004-12-04 23:59:33.000000000 +0100
+++ sherpya/libmpdemux/demux_ts.c	2005-01-21 10:47:33.742608000 +0100
@@ -475,7 +475,7 @@
 	req_spid = param->spid;
 
 	has_tables = 0;
-	bzero(pes_priv1, sizeof(pes_priv1));
+	memset(pes_priv1, 0, sizeof(pes_priv1));
 	init_pos = stream_tell(demuxer->stream);
 	mp_msg(MSGT_DEMUXER, MSGL_INFO, "PROBING UP TO %llu, PROG: %d\n", (uint64_t) param->probe, param->prog);
 	while((pos <= init_pos + param->probe) && (! demuxer->stream->eof))
diff -NubBr -xCVS -xhelp_mp.h -xGui -x'*.a' -x'*.exe' -x'*.o' -xconfigure.log -xconfig.mak -x.cvsignore -x'*.ini' -xconfig.h -xcodecs.conf.h -xversion.h -x.depend main/libmpdemux/network.c sherpya/libmpdemux/network.c
--- main/libmpdemux/network.c	2005-01-08 11:06:37.631448000 +0100
+++ sherpya/libmpdemux/network.c	2005-01-21 10:47:42.164718400 +0100
@@ -228,7 +228,7 @@
 	}
 	
 	
-	bzero(&server_address, sizeof(server_address));
+	memset(&server_address, 0, sizeof(server_address));
 	
 #ifndef HAVE_WINSOCK2
 #ifdef USE_ATON
diff -NubBr -xCVS -xhelp_mp.h -xGui -x'*.a' -x'*.exe' -x'*.o' -xconfigure.log -xconfig.mak -x.cvsignore -x'*.ini' -xconfig.h -xcodecs.conf.h -xversion.h -x.depend main/libmpdvdkit2/bsdi_ioctl.c sherpya/libmpdvdkit2/bsdi_ioctl.c
--- main/libmpdvdkit2/bsdi_ioctl.c	2004-12-04 23:59:41.000000000 +0100
+++ sherpya/libmpdvdkit2/bsdi_ioctl.c	2005-01-21 10:47:49.845763200 +0100
@@ -694,7 +694,7 @@
 	struct	cdrom_tocentry entry;
 	int	ret, i;
 
-	bzero(tracks, sizeof (*tracks));
+	memset(tracks, 0, sizeof (*tracks));
 	ret = cdrom_ioctl(fd, CDROMREADTOCHDR, &header);
 /*
  * This whole business is a crock anyhow so we don't bother distinguishing
diff -NubBr -xCVS -xhelp_mp.h -xGui -x'*.a' -x'*.exe' -x'*.o' -xconfigure.log -xconfig.mak -x.cvsignore -x'*.ini' -xconfig.h -xcodecs.conf.h -xversion.h -x.depend main/subreader.c sherpya/subreader.c
--- main/subreader.c	2004-12-05 07:09:30.000000000 +0100
+++ sherpya/subreader.c	2005-01-21 10:48:10.185009600 +0100
@@ -819,10 +819,10 @@
     static unsigned jacoTimeres = 30;
     static int jacoShift = 0;
 
-    bzero(current, sizeof(subtitle));
-    bzero(line1, LINE_LEN);
-    bzero(line2, LINE_LEN);
-    bzero(directive, LINE_LEN);
+    memset(current, 0, sizeof(subtitle));
+    memset(line1, 0, LINE_LEN);
+    memset(line2, 0, LINE_LEN);
+    memset(directive, 0, LINE_LEN);
     while (!current->text[0]) {
 	if (!fgets(line1, LINE_LEN, fd)) {
 	    return NULL;


More information about the MPlayer-dev-eng mailing list