diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-09 14:17:33 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-09 14:17:33 +0000 |
commit | 6499c3c6d4ee9f02a9ec6df64674f955f3c70813 (patch) | |
tree | 3c963213e39ade4edd8366a127b3d3fe9d74e360 /channels/console_gui.c | |
parent | b39286b4c372876e44a06879ee82f9d1053df4ff (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/console_gui.c')
-rw-r--r-- | channels/console_gui.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/console_gui.c b/channels/console_gui.c index 480f6f1ce..c3ced5e49 100644 --- a/channels/console_gui.c +++ b/channels/console_gui.c @@ -204,7 +204,7 @@ static struct gui_info *cleanup_sdl(struct gui_info *gui, int device_num) if (gui->win[i].bmp) SDL_FreeYUVOverlay(gui->win[i].bmp); } - bzero(gui, sizeof(gui)); + memset(gui, '\0', sizeof(gui)); /* deallocates the space allocated for the keypad message boards */ if (gui->bd_dialed) @@ -290,7 +290,7 @@ static void show_frame(struct video_desc *env, int out) bmp = gui->win[out].bmp; SDL_LockYUVOverlay(bmp); /* output picture info - this is sdl, YUV420P */ - bzero(&p_out, sizeof(p_out)); + memset(&p_out, '\0', sizeof(p_out)); p_out.data[0] = bmp->pixels[0]; p_out.data[1] = bmp->pixels[1]; p_out.data[2] = bmp->pixels[2]; @@ -1358,7 +1358,7 @@ static void sdl_setup(struct video_desc *env) FocusChangeMask | PropertyChangeMask | ColormapChangeMask | OwnerGrabButtonMask; - bzero(&attr, sizeof(attr)); + memset(&attr, '\0', sizeof(attr)); XGetWindowAttributes(SDL_Display, win, &attr); /* the following events can be delivered only to one client. @@ -1565,7 +1565,7 @@ static int keypad_cfg_read(struct gui_info *gui, const char *val) return 0; s1[0] = s2[0] = '\0'; - bzero(&e, sizeof(e)); + memset(&e, '\0', sizeof(e)); i = sscanf(val, "%14s %14s %d %d %d %d %d", s1, s2, &e.x0, &e.y0, &e.x1, &e.y1, &e.h); |