[PATCH v4] shell: exchange Dijkstra $(( )) evaluator..

Steffen Nurpmeso steffen at sdaoden.eu
Fri Sep 9 13:17:35 UTC 2022


P.S.:

Steffen Nurpmeso wrote in
 <20220906193906.L5sY8%steffen at sdaoden.eu>:
 |Bernhard Reutner-Fischer wrote in
 | <20220906183821.1f82672d at nbbrfq>:
 ||On Wed, 31 Aug 2022 01:43:26 +0200
 ||Steffen Nurpmeso <steffen at sdaoden.eu> wrote:
 ...
 ||> +      if(su_64( i > U32_MAX || ) i >= UZ_MAX / 2 ||
 ||
 ||I have to admit that the amount of macro maze makes it really hard to
 ||read ;)
  ...

Now i remember where this comes from!  The first protects the ++i,
as it originally was

  if(su_64( i >= U32_MAX || ) ++i >= UZ_MAX / 2)
    goto jenomem;

and is again here.  Yes!  But

  if(i >= UZ_MAX / 2)
    goto jenomem;
  ++i;

is of course also not wrong.  Sigh.  It was quite some back and
forth, operator stack as POD or struct, all first a function local
and then later part of struct a_shexp_arith_stack, somewhen in
between these changes that was reordered and lost.  So anyway that
su_64() was meant to protect the ++i that follows.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


More information about the busybox mailing list