On Jul 20, 2020, at 11:59 AM, Marc Feeley feeley@iro.umontreal.ca wrote:
} else { if (buf != buffer) free(buf); return ___FIX(___ERRNO_ERR(errno)); }
Small bug here… need to call ___ERRNO_ERR(errno) before the call to free in case free modifies errno… The error handling could also be improved to do the “if (buf != buffer) free(buf);” in fewer places.
Marc