summaryrefslogtreecommitdiff
path: root/res/res_config_pgsql.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-04-10 02:19:58 +0000
committerRussell Bryant <russell@russellbryant.com>2006-04-10 02:19:58 +0000
commitf7c5aee2ada1f62713f02cc6c9346a917243ff8c (patch)
tree250d388bfa9a1d26736522ccc2d083d5fb4984c6 /res/res_config_pgsql.c
parent7878538953b8c03dc3c875fee7a8f2b28146a641 (diff)
remove a couple more unnecessary "out of memory" error messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_config_pgsql.c')
-rw-r--r--res/res_config_pgsql.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c
index 85e894532..bcb179102 100644
--- a/res/res_config_pgsql.c
+++ b/res/res_config_pgsql.c
@@ -317,11 +317,8 @@ static struct ast_config *realtime_multi_pgsql(const char *database, const char
for (rowIndex = 0; rowIndex < num_rows; rowIndex++) {
var = NULL;
- cat = ast_category_new("");
- if (!cat) {
- ast_log(LOG_WARNING, "Out of memory!\n");
+ if (!(cat = ast_category_new("")))
continue;
- }
for (i = 0; i < numFields; i++) {
stringp = PQgetvalue(result, rowIndex, i);
while (stringp) {
@@ -524,10 +521,8 @@ static struct ast_config *config_pgsql(const char *database, const char *table,
if (strcmp(last, field_category) || last_cat_metric != atoi(field_cat_metric)) {
cur_cat = ast_category_new(field_category);
- if (!cur_cat) {
- ast_log(LOG_WARNING, "Out of memory!\n");
+ if (!cur_cat)
break;
- }
strcpy(last, field_category);
last_cat_metric = atoi(field_cat_metric);
ast_category_append(cfg, cur_cat);