mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
(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: https://origsvn.digium.com/svn/asterisk/trunk@147807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user