]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libnetmap: reset errno in nmreq_register_decode()
authorVincenzo Maffione <vmaffione@FreeBSD.org>
Fri, 2 Apr 2021 14:31:57 +0000 (14:31 +0000)
committerVincenzo Maffione <vmaffione@FreeBSD.org>
Fri, 2 Apr 2021 14:31:57 +0000 (14:31 +0000)
commitab639bb2873034786cd2ec4d2d9c4489fbf6f424
treee66066c074266ee2aad577f94361dc3f3314c063
parent69efe3695d75d716e6066a0b1225df00ec98952b
libnetmap: reset errno in nmreq_register_decode()

The reset is necessary at the beginning of the function, because of
the errno logic in the error path (set errno to EINVAL if not set).
If errno is already set when calling the function, and the function
fails, the previous errno value will be inherited.
lib/libnetmap/nmreq.c