[Home]

Summary:ASTERISK-06737: [patch] rev 18607 commit breaks coding guidelines
Reporter:Andrey S Pankov (casper)Labels:
Date Opened:2006-04-09 14:15:18Date Closed:2011-06-07 14:08:21
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Removing braces in the code below breaks "No nested statements without braces".
The code is so purely formatted that after braces removal it would be hard to guess whether e.g. 'free(fieldnames);' should be under for() control or not.

@@ -159,8 +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) {
@@ -177,7 +176,6 @@
 }
}
     }
-    }
 free(fieldnames);
} else {                                
ast_log(LOG_WARNING, "Postgresql RealTime: Could not find any rows in table %s.\n", table);


****** ADDITIONAL INFORMATION ******

Sorry, no patch. I'd just partially revert the commit...
Comments:By: Andrey S Pankov (casper) 2006-04-10 12:06:00

Fixed by russel.