From f06db344ad53c987e38970b55e119a5af36641e1 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 25 Mar 2026 00:03:31 +0000 Subject: mkhtemp: fix err() calling it indirectly was out of the question. must call it directly. Signed-off-by: Leah Rowe --- util/libreboot-utils/lib/string.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'util/libreboot-utils/lib/string.c') diff --git a/util/libreboot-utils/lib/string.c b/util/libreboot-utils/lib/string.c index 2f2be5f3..ea7ca30a 100644 --- a/util/libreboot-utils/lib/string.c +++ b/util/libreboot-utils/lib/string.c @@ -119,7 +119,7 @@ slen(const char *s, /* the one for nvmutil state is in state.c */ /* this one just exits */ void -err_no_cleanup(int nvm_errval, const char *msg, ...) +err_no_cleanup(int stfu, int nvm_errval, const char *msg, ...) { va_list args; int saved_errno = errno; @@ -141,7 +141,10 @@ err_no_cleanup(int nvm_errval, const char *msg, ...) vfprintf(stderr, msg, args); va_end(args); - fprintf(stderr, ": %s\n", strerror(errno)); + if (p != NULL) + fprintf(stderr, ": %s\n", strerror(errno)); + else + fprintf(stderr, "%s\n", strerror(errno)); exit(EXIT_FAILURE); } -- cgit v1.2.1