[asterisk-commits] trunk r18693 - /trunk/res/res_config_pgsql.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Apr 9 18:51:48 MST 2006
Author: russell
Date: Sun Apr 9 20:51:47 2006
New Revision: 18693
URL: http://svn.digium.com/view/asterisk?rev=18693&view=rev
Log:
add back braces that were removed in a recent commit that leave a bunch of
nested statements in a block without branches, which is a violation of the
coding guidelines.
As a matter of fact, this module violates the coding guidelines in multiple
ways that including formatting and code issues. In my opinion, this module
should not have been merged into the trunk in this form.
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=18693&r1=18692&r2=18693&view=diff
==============================================================================
--- trunk/res/res_config_pgsql.c (original)
+++ trunk/res/res_config_pgsql.c Sun Apr 9 20:51:47 2006
@@ -159,7 +159,7 @@
}
for(i = 0; i < numFields; i++)
fieldnames[i]=PQfname(result,i);
- for(rowIndex = 0; rowIndex < num_rows; rowIndex++)
+ for(rowIndex = 0; rowIndex < num_rows; rowIndex++) {
for(i = 0; i < numFields; i++) {
stringp = PQgetvalue(result,rowIndex,i);
while(stringp) {
@@ -176,6 +176,7 @@
}
}
}
+ }
free(fieldnames);
} else {
ast_log(LOG_WARNING, "Postgresql RealTime: Could not find any rows in table %s.\n", table);
More information about the asterisk-commits
mailing list