mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-21 09:10:36 +00:00
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
This commit is contained in:
@@ -317,11 +317,8 @@ static struct ast_config *realtime_multi_pgsql(const char *database, const char
|
|||||||
|
|
||||||
for (rowIndex = 0; rowIndex < num_rows; rowIndex++) {
|
for (rowIndex = 0; rowIndex < num_rows; rowIndex++) {
|
||||||
var = NULL;
|
var = NULL;
|
||||||
cat = ast_category_new("");
|
if (!(cat = ast_category_new("")))
|
||||||
if (!cat) {
|
|
||||||
ast_log(LOG_WARNING, "Out of memory!\n");
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
for (i = 0; i < numFields; i++) {
|
for (i = 0; i < numFields; i++) {
|
||||||
stringp = PQgetvalue(result, rowIndex, i);
|
stringp = PQgetvalue(result, rowIndex, i);
|
||||||
while (stringp) {
|
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)) {
|
if (strcmp(last, field_category) || last_cat_metric != atoi(field_cat_metric)) {
|
||||||
cur_cat = ast_category_new(field_category);
|
cur_cat = ast_category_new(field_category);
|
||||||
if (!cur_cat) {
|
if (!cur_cat)
|
||||||
ast_log(LOG_WARNING, "Out of memory!\n");
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
strcpy(last, field_category);
|
strcpy(last, field_category);
|
||||||
last_cat_metric = atoi(field_cat_metric);
|
last_cat_metric = atoi(field_cat_metric);
|
||||||
ast_category_append(cfg, cur_cat);
|
ast_category_append(cfg, cur_cat);
|
||||||
|
|||||||
Reference in New Issue
Block a user