comparison src/ntplay.c @ 400:a86b2b5e0111 r21-2-30

Import from CVS: tag r21-2-30
author cvs
date Mon, 13 Aug 2007 11:14:34 +0200
parents 74fd4e045ea6
children b8cc9ab3f761
comparison
equal deleted inserted replaced
399:376370fb5946 400:a86b2b5e0111
49 49
50 if (ofd <0) 50 if (ofd <0)
51 return; 51 return;
52 52
53 size = lseek (ofd, 0, SEEK_END); 53 size = lseek (ofd, 0, SEEK_END);
54 data = xmalloc (size); 54 data = (unsigned char *)xmalloc (size);
55 lseek (ofd, 0, SEEK_SET); 55 lseek (ofd, 0, SEEK_SET);
56 56
57 if (!data) 57 if (!data)
58 { 58 {
59 close (ofd); 59 close (ofd);
88 sound_data=0; 88 sound_data=0;
89 } 89 }
90 90
91 if (convert_to_malloc) 91 if (convert_to_malloc)
92 { 92 {
93 sound_data = xmalloc (length); 93 sound_data = (unsigned char *)xmalloc (length);
94 memcpy (sound_data, data, length); 94 memcpy (sound_data, data, length);
95 } 95 }
96 else 96 else
97 sound_data = data; 97 sound_data = data;
98 98