summaryrefslogtreecommitdiff
path: root/cel
diff options
context:
space:
mode:
authorRodrigo Ramírez Norambuena <decipher.hk@gmail.com>2015-05-06 06:28:28 -0400
committerAshley Sanders <asanders@digium.com>2015-05-13 15:49:37 -0500
commit46bb8449e8a7e174b62f5efe8aa7663cff4948fc (patch)
tree369ac9990ff00234fe15f5933f05eff785a9df54 /cel
parent74165b9d6cdbf2c78a07ecc972b03026d2c18d40 (diff)
cel/cel_pgsql.c: Use the 'SEP' macro when appending a column name
When appending a column name to the sql buffer, the predicate, "if first is non-null, use empty string; else, use comma", is identical to the 'SEP' macro definition. Since they are the same, this patch replaces the redundant predicate statement with the 'SEP' macro. Change-Id: Ib8b6138b06a48381723108a05ab8752cb8700509
Diffstat (limited to 'cel')
-rw-r--r--cel/cel_pgsql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cel/cel_pgsql.c b/cel/cel_pgsql.c
index 2d7f0dfb0..bc76b2740 100644
--- a/cel/cel_pgsql.c
+++ b/cel/cel_pgsql.c
@@ -201,7 +201,7 @@ static void pgsql_log(struct ast_event *event)
AST_RWLIST_RDLOCK(&psql_columns);
AST_RWLIST_TRAVERSE(&psql_columns, cur, list) {
LENGTHEN_BUF1(strlen(cur->name) + 2);
- ast_str_append(&sql, 0, "%s\"%s\"", first ? "" : ",", cur->name);
+ ast_str_append(&sql, 0, "%s\"%s\"", SEP, cur->name);
if (strcmp(cur->name, "eventtime") == 0) {
if (strncmp(cur->type, "int", 3) == 0) {