Fix unitialized access of err and erroneous error message.
malloc(3) already sets errno and we should return on NULL.
Hi, sorry if this is too silly I was just going over the code and noticed it, also you could use err(3) or errx(3) and cut some lines. I have more silly fixes like this I can push if you want.
I don't have a proper setup to test this yet for regressions, so I didn't build it.
Again, I apologize if the changes are too pedantic.
Hi! Thanks a lot for taking the interest in working on this. Your changes look good to me, just a couple of comments:
-
Could you please add a Sign-off-by line to the commits?
-
Importing one of the ideas from Rust formatting, I'd prefer to avoid if-else blocks without braces, as I find them prone to errors. Could you please re-add them?
Thanks for reviewing it. I've re-added the braces as requested as well as the Sign-off-by.
@haesbaert There seems to be some conflicts with this PR as a lot has been done since its submission. Do you mind rebasing on main?