Begin on a crusade to end trailing whitespace!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Terry Wilson
2008-11-20 17:48:58 +00:00
parent ad918da94f
commit 4f8242904a
10 changed files with 61 additions and 61 deletions

View File

@@ -3,8 +3,8 @@
*
* Copyright (C) 2003 - 2006
*
* Matthew D. Hardeman <mhardemn@papersoft.com>
* Adapted from the MySQL CDR logger originally by James Sharp
* Matthew D. Hardeman <mhardemn@papersoft.com>
* Adapted from the MySQL CDR logger originally by James Sharp
*
* Modified September 2003
* Matthew D. Hardeman <mhardemn@papersoft.com>
@@ -22,9 +22,9 @@
/*! \file
*
* \brief PostgreSQL CDR logger
*
* \author Matthew D. Hardeman <mhardemn@papersoft.com>
* \brief PostgreSQL CDR logger
*
* \author Matthew D. Hardeman <mhardemn@papersoft.com>
* \extref PostgreSQL http://www.postgresql.org/
*
* See also
@@ -125,7 +125,7 @@ static int pgsql_log(struct ast_cdr *cdr)
struct columns *cur;
struct ast_str *sql = ast_str_create(maxsize), *sql2 = ast_str_create(maxsize2);
char buf[257], escapebuf[513], *value;
if (!sql || !sql2) {
if (sql) {
ast_free(sql);
@@ -138,7 +138,7 @@ static int pgsql_log(struct ast_cdr *cdr)
ast_str_set(&sql, 0, "INSERT INTO %s (", table);
ast_str_set(&sql2, 0, " VALUES (");
AST_RWLIST_RDLOCK(&psql_columns);
AST_RWLIST_TRAVERSE(&psql_columns, cur, list) {
/* For fields not set, simply skip them */
@@ -156,7 +156,7 @@ static int pgsql_log(struct ast_cdr *cdr)
}
continue;
}
LENGTHEN_BUF1(strlen(cur->name) + 2);
ast_str_append(&sql, 0, "\"%s\",", cur->name);