diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-29 09:10:57 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-29 09:18:36 +0100 |
| commit | c2a70b7de0e15dc80d5b56d438a6d4ed47647b44 (patch) | |
| tree | 5c5281bb789f0ea9ab1d8766f5cea6e7182d431b /util/libreboot-utils/lib/file.c | |
| parent | 45edcf33f7d4b2f405c0f59fccc71b6ac15f5c65 (diff) | |
libreboot-utils: simplify random tmpdir namegen
generalise it in rand.c because this logic will
be useful for other programs in the future.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/lib/file.c')
| -rw-r--r-- | util/libreboot-utils/lib/file.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/util/libreboot-utils/lib/file.c b/util/libreboot-utils/lib/file.c index 3620f425..48eb37ed 100644 --- a/util/libreboot-utils/lib/file.c +++ b/util/libreboot-utils/lib/file.c @@ -538,20 +538,6 @@ try_err(int loop_err, int errval) } void -free_and_set_null(char **buf) -{ - if (buf == NULL) - err_exit(EFAULT, - "null ptr (to ptr for freeing) in free_and_set_null"); - - if (*buf == NULL) - return; - - free(*buf); - *buf = NULL; -} - -void open_on_eintr(const char *path, int *fd, int flags, mode_t mode, struct stat *st) |
