always set errno to ENOMEM on OOM condition and in single place

While standards do not require us to set errno to ENOMEM in certain
places (like posix_memalign), existing code may sometimes set it
(i.e. because mmap or sbrk couldn't get memory from kernel)
anyways. And from my reading of glibc, it's malloc is doing more or
less same by just always setting ENOMEM on OOM condition.

This commit also eliminates some functions (XXX_no_errno) that are not
needed anymore.
This commit is contained in:
Aliaksey Kandratsenka 2015-08-02 10:53:32 -07:00
parent c4493874cd
commit 41aca070e8
3 changed files with 28 additions and 47 deletions