Subject: Re: bug#30253: Fix for bug 21062 coreutils-8.24 - cp(1) check failures on tmpfs filesystem (Solaris 10 / Solaris 11)

From: Paul Eggert <[email-masked]>
Date: Sat, 27 Jan 2018 17:51:17 -0800

Pádraig Brady wrote:
> On the face of it, setting errno=0 when returning 0 seems correct,

I would say just the opposite. Typically, functions that return 0 on success and 
-1 (setting errno) on failure, are allowed to set errno to whatever they like on 
success. So it should not fix any bugs to set errno to 0 here. My guess is that 
the bugs are in the callers, not here in the callees.