On 25/09/2020 17:42, Joel Sherrill wrote:
With this style it is not really clear what belongs to the condition and what to the next code block. The ") {" in a separate line makes this more clear.diff --git a/cpukit/libmisc/monitor/mon-queue.c b/cpukit/libmisc/monitor/mon-queue.c index 9430797c6c..aadfcd3989 100644 --- a/cpukit/libmisc/monitor/mon-queue.c +++ b/cpukit/libmisc/monitor/mon-queue.c @@ -16,7 +16,21 @@ rtems_monitor_queue_canonical( { const Message_queue_Control *rtems_queue = (const Message_queue_Control *) queue_void;- canonical_queue->attributes = rtems_queue->attribute_set; + canonical_queue->attributes = 0; + + if ( + rtems_queue->message_queue.operations + == &_Thread_queue_Operations_priority + ) { Why the odd formatting on this? I would think it should be: if ( rtems_queue->message_queue.operations == &_Thread_queue_Operations_priority ) {
I used this style all over the place for a couple of years. Unfortunately, this area is not covered by the coding conventions:
https://docs.rtems.org/branches/master/eng/coding-conventions.html#formatting _______________________________________________ devel mailing list [email protected] http://lists.rtems.org/mailman/listinfo/devel
