RTEMS | Reformat cpukit rtems src (!237)

Amar Takhar (@amar) gitlab at rtems.org
Tue Sep 24 01:37:32 UTC 2024




Amar Takhar commented on a discussion on cpukit/rtems/src/partcreate.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/237#note_112490

 >      return RTEMS_TOO_MANY;
 >    }
 >  
 > -#if defined(RTEMS_MULTIPROCESSING)
 > -  if ( _Attributes_Is_global( attribute_set ) &&
 > -       !( _Objects_MP_Allocate_and_open( &_Partition_Information, name,
 > -                            the_partition->Object.id, false ) ) ) {
 > +#if defined( RTEMS_MULTIPROCESSING )
 > +  if (
 > +    _Attributes_Is_global( attribute_set ) && !( _Objects_MP_Allocate_and_open(
 > +                                                &_Partition_Information,
 > +                                                name,
 > +                                                the_partition->Object.id,
 > +                                                false
 > +                                              ) )
 > +  ) {

I don't think it's that bad not like the original is much better reading the arguments pretty easy to miss that `name` and `false`.  I do agree that having it far on the right is not desirable but I do like the wrapping in this case since it all can't fit on one line.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/237#note_112490
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240924/246ca384/attachment.htm>


More information about the bugs mailing list