[svn-commits] trunk r18723 - /trunk/res/res_config_pgsql.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Sun Apr 9 19:20:00 MST 2006
Author: russell
Date: Sun Apr 9 21:19:58 2006
New Revision: 18723
URL: http://svn.digium.com/view/asterisk?rev=18723&view=rev
Log:
remove a couple more unnecessary "out of memory" error messages
Modified:
trunk/res/res_config_pgsql.c
Modified: trunk/res/res_config_pgsql.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_config_pgsql.c?rev=18723&r1=18722&r2=18723&view=diff
==============================================================================
--- trunk/res/res_config_pgsql.c (original)
+++ trunk/res/res_config_pgsql.c Sun Apr 9 21:19:58 2006
@@ -317,11 +317,8 @@
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 @@
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);
More information about the svn-commits
mailing list