aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_usbradio.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-09 14:17:33 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-09 14:17:33 +0000
commit6499c3c6d4ee9f02a9ec6df64674f955f3c70813 (patch)
tree3c963213e39ade4edd8366a127b3d3fe9d74e360 /channels/chan_usbradio.c
parentb39286b4c372876e44a06879ee82f9d1053df4ff (diff)
(closes issue #13557)
Reported by: nickpeirson Patches: pbx.c.patch uploaded by nickpeirson (license 579) replace_bzero+bcopy.patch uploaded by nickpeirson (license 579) Tested by: nickpeirson, murf 1. replaced all refs to bzero and bcopy to memset and memmove instead. 2. added a note to the CODING-GUIDELINES 3. add two macros to asterisk.h to prevent bzero, bcopy from creeping back into the source 4. removed bzero from configure, configure.ac, autoconfig.h.in git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147807 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_usbradio.c')
-rw-r--r--channels/chan_usbradio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_usbradio.c b/channels/chan_usbradio.c
index f3196e30c..a5daebe7c 100644
--- a/channels/chan_usbradio.c
+++ b/channels/chan_usbradio.c
@@ -1411,7 +1411,7 @@ static void send_sound(struct chan_usbradio_pvt *o)
l = FRAME_SIZE - ofs;
if (l > s->datalen - start) /* don't overflow the source */
l = s->datalen - start;
- bcopy(s->data + start, myframe + ofs, l * 2);
+ memmove(myframe + ofs, s->data + start, l * 2);
if (0)
ast_log(LOG_WARNING, "send_sound sound %d/%d of %d into %d\n", l_sampsent, l, s->samplen, ofs);
l_sampsent += l;
@@ -1422,14 +1422,14 @@ static void send_sound(struct chan_usbradio_pvt *o)
if (l > 0) {
if (l > FRAME_SIZE - ofs)
l = FRAME_SIZE - ofs;
- bcopy(silence, myframe + ofs, l * 2);
+ memmove(myframe + ofs, silence, l * 2);
l_sampsent += l;
} else { /* silence is over, restart sound if loop */
if (s->repeat == 0) { /* last block */
o->cursound = -1;
o->nosound = 0; /* allow audio data */
if (ofs < FRAME_SIZE) /* pad with silence */
- bcopy(silence, myframe + ofs, (FRAME_SIZE - ofs) * 2);
+ memmove(myframe + ofs, silence, (FRAME_SIZE - ofs) * 2);
}
l_sampsent = 0;
}
@@ -1813,7 +1813,7 @@ static struct ast_frame *usbradio_read(struct ast_channel *c)
}
/* XXX can be simplified returning &ast_null_frame */
/* prepare a NULL frame in case we don't have enough data to return */
- bzero(f, sizeof(struct ast_frame));
+ memset(f, '\0', sizeof(struct ast_frame));
f->frametype = AST_FRAME_NULL;
f->src = usbradio_tech.type;