findprog-in: Don't exit upon out-of-memory.
commit5fde00bdb689884f6de0ab2829f0df907380a010
authorBruno Haible <bruno@clisp.org>
Thu, 10 Dec 2020 20:32:54 +0000 (10 21:32 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 10 Dec 2020 20:49:04 +0000 (10 21:49 +0100)
treeb021445b9a744808487a631e30d91bd9aa9b2076
parent658d3920dd6d1e41efe8d1f3b7e22a356e3d709d
findprog-in: Don't exit upon out-of-memory.

* lib/findprog.h (find_in_given_path): Document ENOMEM as possible error
code.
* lib/findprog-in.c: Don't include xalloc.h.
(find_in_given_path): Call concatenated_filename, not
xconcatenated_filename. Call strdup, not xstrdup. Upon out-of-memory,
return NULL with errno set.
* modules/findprog-in (Depends-on): Remove xconcat-filename, xalloc. Add
concat-filename, strdup-posix, malloc-posix.
ChangeLog
lib/findprog-in.c
lib/findprog.h
modules/findprog-in