Convert some strncpys to ast_copy_string

Review: https://reviewboard.asterisk.org/r/1732/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Terry Wilson
2012-04-19 19:05:17 +00:00
parent ba93541ced
commit 6d6bacd5cb
4 changed files with 34 additions and 61 deletions

View File

@@ -663,7 +663,6 @@ static int load_config(void)
p = ast_variable_retrieve(cfg, "general", "eventcmd");
if (p) {
ast_copy_string(event_app, p, sizeof(event_app));
event_app[sizeof(event_app) - 1] = '\0';
}
p = ast_variable_retrieve(cfg, "general", "loudness");
if (p) {
@@ -698,19 +697,16 @@ static int load_config(void)
p = ast_variable_retrieve(cfg, "general", "eventspooldir");
if (p) {
ast_copy_string(event_spool_dir, p, sizeof(event_spool_dir));
event_spool_dir[sizeof(event_spool_dir) - 1] = '\0';
}
p = ast_variable_retrieve(cfg, "general", "timestampformat");
if (p) {
ast_copy_string(time_stamp_format, p, sizeof(time_stamp_format));
time_stamp_format[sizeof(time_stamp_format) - 1] = '\0';
}
p = ast_variable_retrieve(cfg, "general", "db-family");
if (p) {
ast_copy_string(db_family, p, sizeof(db_family));
db_family[sizeof(db_family) - 1] = '\0';
}
ast_config_destroy(cfg);
}