diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/astobj2.c | 2 | ||||
-rw-r--r-- | main/cli.c | 4 | ||||
-rw-r--r-- | main/config.c | 2 | ||||
-rw-r--r-- | main/pbx.c | 2 | ||||
-rw-r--r-- | main/rtp.c | 4 | ||||
-rw-r--r-- | main/translate.c | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/main/astobj2.c b/main/astobj2.c index dd48ae924..87dfd0385 100644 --- a/main/astobj2.c +++ b/main/astobj2.c @@ -194,7 +194,7 @@ int ao2_ref(void *user_data, const int delta) /* for safety, zero-out the astobj2 header and also the * first word of the user-data, which we make sure is always * allocated. */ - bzero(obj, sizeof(struct astobj2 *) + sizeof(void *) ); + memset(obj, '\0', sizeof(struct astobj2 *) + sizeof(void *) ); free(obj); } diff --git a/main/cli.c b/main/cli.c index b5ff643dd..6b129bc84 100644 --- a/main/cli.c +++ b/main/cli.c @@ -1426,7 +1426,7 @@ static int __ast_cli_unregister(struct ast_cli_entry *e, struct ast_cli_entry *e e->_full_cmd = NULL; if (e->handler) { /* this is a new-style entry. Reset fields and free memory. */ - bzero((char **)(e->cmda), sizeof(e->cmda)); + memset((char **)(e->cmda), '\0', sizeof(e->cmda)); ast_free(e->command); e->command = NULL; e->usage = NULL; @@ -1444,7 +1444,7 @@ static int __ast_cli_register(struct ast_cli_entry *e, struct ast_cli_entry *ed) char **dst = (char **)e->cmda; /* need to cast as the entry is readonly */ char *s; - bzero (&a, sizeof(a)); + memset(&a, '\0', sizeof(a)); e->handler(e, CLI_INIT, &a); /* XXX check that usage and command are filled up */ s = ast_skip_blanks(e->command); diff --git a/main/config.c b/main/config.c index ddf660d1a..9c96327b0 100644 --- a/main/config.c +++ b/main/config.c @@ -2269,7 +2269,7 @@ int ast_parse_arg(const char *arg, enum ast_parse_flags flags, struct hostent *hp; struct ast_hostent ahp; - bzero(&_sa_buf, sizeof(_sa_buf)); /* clear buffer */ + memset(&_sa_buf, '\0', sizeof(_sa_buf)); /* clear buffer */ /* duplicate the string to strip away the :port */ port = ast_strdupa(arg); buf = strsep(&port, ":"); diff --git a/main/pbx.c b/main/pbx.c index 70f1f0c50..8739552d4 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -1719,7 +1719,7 @@ static int ext_cmp1(const char **p) return 0x40000; /* XXX make this entry go last... */ } - bzero(chars, sizeof(chars)); /* clear all chars in the set */ + memset(chars, '\0', sizeof(chars)); /* clear all chars in the set */ for (; *p < end ; (*p)++) { unsigned char c1, c2; /* first-last char in range */ c1 = (unsigned char)((*p)[0]); diff --git a/main/rtp.c b/main/rtp.c index 2c891cdf3..46107e33e 100644 --- a/main/rtp.c +++ b/main/rtp.c @@ -625,7 +625,7 @@ int ast_stun_request(int s, struct sockaddr_in *dst, res = ast_select(s + 1, &rfds, NULL, NULL, &to); if (res <= 0) /* timeout or error */ continue; - bzero(&src, sizeof(src)); + memset(&src, '\0', sizeof(src)); srclen = sizeof(src); /* XXX pass -1 in the size, because stun_handle_packet might * write past the end of the buffer. @@ -637,7 +637,7 @@ int ast_stun_request(int s, struct sockaddr_in *dst, retry, res); continue; } - bzero(answer, sizeof(struct sockaddr_in)); + memset(answer, '\0', sizeof(struct sockaddr_in)); stun_handle_packet(s, &src, reply_buf, res, stun_get_mapped, answer); res = 0; /* signal regular exit */ diff --git a/main/translate.c b/main/translate.c index eeeb7cbd1..a38a67024 100644 --- a/main/translate.c +++ b/main/translate.c @@ -451,7 +451,7 @@ static void rebuild_matrix(int samples) ast_debug(1, "Resetting translation matrix\n"); - bzero(tr_matrix, sizeof(tr_matrix)); + memset(tr_matrix, '\0', sizeof(tr_matrix)); /* first, compute all direct costs */ AST_RWLIST_TRAVERSE(&translators, t, list) { |