Andrey A. Chernov 5f5a50728c 1) Although unpublished version of standard
http://austingroupbugs.net/view.php?id=385#c713
(Resolved state) recommend this way for the current standard (called
"earlier" in the text)

"However, earlier versions of this standard did not require this, and the
same example had to be written as:

    // buf was obtained by malloc(buflen)
    ret = write(fd, buf, buflen);
    if (ret < 0) {
        int save = errno;
        free(buf);
        errno = save;
        return ret;
    }
"

from feedback I have for previous commit it seems that many people prefer
to avoid mass code change needed for current standard compliance
and prefer to track unpublished standard instead, which requires now
that free() itself must save errno, not its usage code.

So, I back out "save errno across free()" part of previous commit,
and will fill PR for changing free() isntead.

2) Remove now unused serrno.

MFC after:      1 week
2012-06-05 16:16:33 +00:00
..
2012-05-11 20:06:46 +00:00
2010-08-02 13:11:41 +00:00
2008-07-06 11:31:20 +00:00
2011-12-15 11:16:41 +00:00
2010-10-06 09:24:33 +00:00
2007-12-11 20:39:32 +00:00
2012-05-11 20:06:46 +00:00