[Home]

Summary:ASTERISK-04382: minor code cleanup in app_queue.c
Reporter:Roy Sigurd Karlsbakk (rkarlsba)Labels:
Date Opened:2005-06-09 09:40:16Date Closed:2011-06-07 14:11:58
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_queue-code-cleanup.patch
( 1) app_queue-code-cleanup-all-switches.patch
Description:changed stuff like this to make code readability easier.
also changed indents at one place
no changes apart from that

-                       if (!qe->parent->strategy) {
+                       if (qe->parent->strategy == QUEUE_STRATEGY_RINGALL) {
Comments:By: Clod Patry (junky) 2005-06-09 09:46:17

switch aren't in that way in CODING-GUIDELINES.

By: Roy Sigurd Karlsbakk (rkarlsba) 2005-06-09 09:55:13

according to http://www.voip-info.org/wiki-Asterisk+Developer+Guidelines, it is.

switch (x) {
 case 1:
   blah;
   break
 case 2:
   break;
}

and not as the code in app_queue.c, that uses something like this

switch (x) {
case 1:
 asdf;
}

By: Roy Sigurd Karlsbakk (rkarlsba) 2005-06-09 09:59:47

this takes all of the switches

By: Olle Johansson (oej) 2005-06-09 10:27:13

Roy, sorry. The wiki must be wrong. Switches are
switch (x) {
case Y: akjsdhf

No tab intendt before the "case". The right guidelines is the file in your source repository.

By: Clod Patry (junky) 2005-06-09 11:51:43

and i said CODING-GUIDELINES which is in doc. Note that i didn't say "Developer Guidelines in wikis".

And like oej said, that information are wrong, like many information in the wikis.

So take your /usr/src/asterisk/doc/CODING-GUIDELINES .

By: Kevin P. Fleming (kpfleming) 2005-06-09 15:35:16

And also keep in mind that the CODING-GUIDELINES document in the v1-0 branch is not kept up to date with the one in the HEAD branch, but the HEAD document is the canonical source of the current guidelines, for all code submitted to the Asterisk and Zaptel (and related) trees.

I'll leave this up to Russell, but I doubt he's going to want to commit patches to the v1-0 branch that don't change any functionality.

By: Russell Bryant (russell) 2005-06-13 17:22:23

not included in 1.0 since it does not actually fix any bugs