Re: [PATCH] do not pretend sha1write returns errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> The sha1write function returns an int, but it will always be
> "0". The failure-prone parts of the function happen in the
> "flush" callback, which cannot pass an error back to us. So
> we just end up calling die() during the flush.
>
> Let's just drop the return value altogether, as it only
> confuses callers into thinking that it might be useful.
>
> Only one call site actually checked the return value. We can
> drop that check, since it just led to a die() anyway.
>
> Signed-off-by: Jeff King <peff@xxxxxxxx>

Thanks.

> This is kind of a step backwards if we ever wanted to actually make
> sha1write's return code mean anything. But I just don't foresee that
> happening.

Meh.  It hasn't returned a useful value since its introduction in 2005.

-- 
Thomas Rast
tr@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]