[PATCH] score: Clarify code block

Joel Sherrill joel at rtems.org
Mon Jan 23 19:43:32 UTC 2023


On Mon, Jan 23, 2023, 9:18 AM Gedare Bloom <gedare at rtems.org> wrote:

> ok. also ok would have been merging the lines.
>

I like not chaining the assignments. I think simple lines are easier for
review. I suspect some coding style wouldn't like it anyway.

>
> On Mon, Jan 23, 2023 at 6:18 AM Sebastian Huber
> <sebastian.huber at embedded-brains.de> wrote:
> >
> > Do not use a chained assignment for code clarity.
> >
> > Update #4818.
> > ---
> >  cpukit/score/src/threadcreateidle.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/cpukit/score/src/threadcreateidle.c
> b/cpukit/score/src/threadcreateidle.c
> > index cb15d5cc3c..4f16a57099 100644
> > --- a/cpukit/score/src/threadcreateidle.c
> > +++ b/cpukit/score/src/threadcreateidle.c
> > @@ -105,7 +105,7 @@ static void _Thread_Create_idle_for_CPU(
> >     *  WARNING!!! This is necessary to "kick" start the system and
> >     *             MUST be done before _Thread_Start is invoked.
> >     */
> > -  cpu->heir      =
> > +  cpu->heir      = idle;
> >    cpu->executing = idle;
> >  #if defined(RTEMS_SMP)
> >    cpu->ancestor = idle;
> > --
> > 2.35.3
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20230123/a404d700/attachment.htm>


More information about the devel mailing list