Remaining rgagnon source audit improvements (bug #2011)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-07-14 07:44:19 +00:00
parent 872685d088
commit 8ed49644a6
9 changed files with 169 additions and 135 deletions

View File

@@ -351,7 +351,9 @@ static int show_translation(int fd, int argc, char *argv[])
ast_cli(fd, " Source Format (Rows) Destination Format(Columns)\n\n");
ast_mutex_lock(&list_lock);
for (x=-1;x<SHOW_TRANS; x++) {
strcpy(line, " ");
/* next 2 lines run faster than using strcpy() */
line[0] = ' ';
line[1] = '\0';
for (y=-1;y<SHOW_TRANS;y++) {
if (x >= 0 && y >= 0 && tr_matrix[x][y].step)
snprintf(line + strlen(line), sizeof(line) - strlen(line), " %5d", tr_matrix[x][y].cost >= 99999 ? tr_matrix[x][y].cost-99999 : tr_matrix[x][y].cost);