don't write openpty results until success is determined
authorRich Felker <dalias@aerifal.cx>
Sun, 21 Dec 2014 04:22:57 +0000 (23:22 -0500)
committerRich Felker <dalias@aerifal.cx>
Sun, 21 Dec 2014 04:22:57 +0000 (23:22 -0500)
commit3b26a32df42092af6d0cdac655e52635b91d36b2
tree84b1efc57b5c23da99b377883f62c201d35a155a
parent4b2cb37770e56835b261660535cea77474154ba0
don't write openpty results until success is determined

not only is this semantically more correct; it also reduces code size
slightly by eliminating the need for the compiler to assume the
possibility of aliasing.
src/misc/openpty.c