Re: [RFC] [2.5 patch] Change strlcpy and strlcat

Linus Torvalds (torvalds@transmeta.com)
Mon, 26 May 2003 10:11:31 -0700 (PDT)


On Mon, 26 May 2003, Adrian Bunk wrote:
>
> Your API is compatible with *BSD but I'm wondering whether something
> slightly different might make error handling for callers easier:

Well, judging by the fact that pretty much 99.9% of all users won't ever
care about the return value. And coupled with the fact that the current
behaviour is compatible with BSD (except for the BUG_ON() that I added,
and I have no idea what BSD does for that case, since it pretty clearly
_is_ a bug), I definitely prefer having standard return values than trying
to make it "easier".

The BSD return values do actually make sense for nested operations.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/