]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
contrib/cleanup: be more correct
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 7 Oct 2020 07:51:16 +0000 (09:51 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 7 Oct 2020 07:51:16 +0000 (09:51 +0200)
commitb9cba1443bc9d964e681968195e29b637aca8b7d
tree7d090ce8b4df092c095bb4efaf928f986fbd8abd
parent0ba7c63b66ca8c4d32fba43734c057f173e20cb7
contrib/cleanup: be more correct

It's mainly about the fact that FD can be zero (though it's not common).
Our current usage is just in tests and seems fine.

I don't think that other negative FDs are possible, but I'm lazy to find
"proof" in POSIX and using other negative values than -1 doesn't make
sense to me anyway (might be an assert, I guess).
contrib/cleanup.h