Hello Rasmus,
On 07.07.22 15:12, Rasmus Villemoes wrote:
> The size of the dynamic stack allocation here is bounded by the if()
> statement. However, just allocating the maximum size up-front and
> doing malloc() if necessary avoids code duplication (the
> i2c_setup_offset() until the invocation
Hello Rasmus,
On 07.07.22 15:12, Rasmus Villemoes wrote:
> The size of the dynamic stack allocation here is bounded by the if()
> statement. However, just allocating the maximum size up-front and
> doing malloc() if necessary avoids code duplication (the
> i2c_setup_offset() until the invocation
The size of the dynamic stack allocation here is bounded by the if()
statement. However, just allocating the maximum size up-front and
doing malloc() if necessary avoids code duplication (the
i2c_setup_offset() until the invocation of ->xfer), and generates much
better (smaller) code:
3 matches
Mail list logo