fix/cleanup printf strings and errno handling
4 files changed