changeset 3700:91f801a94a59

memset is more portable than bzero ("BSD"ism)
author pl
date Mon, 24 Dec 2001 10:35:43 +0000
parents 5002156efd4f
children a33d0351630e
files cpudetect.c libao2/ao_alsa5.c libmpdemux/dvdauth.c
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/cpudetect.c	Mon Dec 24 10:27:28 2001 +0000
+++ b/cpudetect.c	Mon Dec 24 10:35:43 2001 +0000
@@ -87,7 +87,7 @@
 
 	caps->isX86=1;
 
-	bzero(caps, sizeof(*caps));
+	memset(caps, 0, sizeof(*caps));
 	if (!has_cpuid()) {
 	    printf("CPUID not supported!???\n");
 	    return;
--- a/libao2/ao_alsa5.c	Mon Dec 24 10:27:28 2001 +0000
+++ b/libao2/ao_alsa5.c	Mon Dec 24 10:35:43 2001 +0000
@@ -173,7 +173,7 @@
 
     if (info.flags & SND_PCM_INFO_PLAYBACK)
     {
-	bzero(&chninfo, sizeof(chninfo));
+	memset(&chninfo, 0, sizeof(chninfo));
 	chninfo.channel = SND_PCM_CHANNEL_PLAYBACK;
 	if ((err = snd_pcm_channel_info(alsa_handler, &chninfo)) < 0)
 	{
--- a/libmpdemux/dvdauth.c	Mon Dec 24 10:27:28 2001 +0000
+++ b/libmpdemux/dvdauth.c	Mon Dec 24 10:35:43 2001 +0000
@@ -92,7 +92,7 @@
     fp=popen(cmd,"r");
     if (fp) {
 	    int ret;
-	    bzero(cmd,sizeof(cmd));
+	    memset(cmd,0,sizeof(cmd));
 	    fgets(cmd,99,fp);
 	    if ((ret=pclose(fp)))
 		    fprintf(stderr,"fibmap_mplayer: %s\n",*cmd?cmd:"no error info");
@@ -158,7 +158,7 @@
 {
 	unsigned char *t=key_title;
 	int digit=4,len;
-	bzero(key_title,sizeof(key_title));
+	memset(key_title,0,sizeof(key_title));
 //	printf("DVD key: %s\n",hexkey);
 	for (len=0;len<10;len++) {
 //		printf("-> %c\n",*hexkey);