src/t_ofd_locks.c: Reset errno to zero