Avoid call to xo_write before xo_flush, since the latter calls the former; Check return code from xo_flush_h properly (<0) (FreeBSD Bug 236937)
Avoid call to xo_write before xo_flush, since the latter calls the former; Check return code from xo_flush_h properly (<0) (FreeBSD Bug 236937)

Juniper/libxo,Juniper/libxo,Juniper/libxo,Juniper/libxo