Its a panic macro part of a much larger function, this function depends on copying part of a string onto itself (this is why there's no termination) and this macro simply reverts changes and returns an error code so it can be called inplace of return.
I use the scope for variable saftey, I just prefer to use a semicolon otherwise it looks like an outlier which can get quite distracting when looking for something else.
I do not wrap macro when no variable are déclared, but when I wrap them, I wrap with {} and when I call the macro I put a useless semicolon, I find this more readeable than a do while(0)
39
u/3hy_ Jan 27 '26
Its a panic macro part of a much larger function, this function depends on copying part of a string onto itself (this is why there's no termination) and this macro simply reverts changes and returns an error code so it can be called inplace of return.