Il 17/12/21 19:39, Nicolas Pitre ha scritto:
I'm truly sad saying that, but if you keep stating that to write code that has undefined behavior for C standard and such behavior is not a documented compiler extensions is a sane thing to do, I find very hard to find a common ground.Also in some points I've added /*? shaped comments to points out that the codePlease review https://github.com/zephyrproject-rtos/zephyr/pull/41090
I confess that this is very embarassing for me and I would have hoped to be able to find the right words to explain why this is not sane at all.
It is clear now I've failed and I'm the one to blame for that.
I hope that someone else will succeed where I have failed.
In the specific of your PR: have you considered that if, instead to keep increasing buf, you increase a buffer offset you would avoid to do ugly tricks and NULL subtraction?
BUGSENG srl - http://bugseng.com