summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/mkhtemp.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-04-01 10:03:41 +0100
committerLeah Rowe <leah@libreboot.org>2026-04-01 10:03:41 +0100
commit861f56375aee4291285e8c853896044ce04343cd (patch)
treeb9ed6e8ae1a8d0504036e4c45827df4b82dd4658 /util/libreboot-utils/mkhtemp.c
parentd91dd0ad81f041e725599665d23c16d8c9f35b75 (diff)
libreboot-utils: fix ALL compiler warnings
i wasn't using strict mode enough in make: make strict now it compiles cleanly. mostly removing unused variables, fixing implicit conversions, etc. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/mkhtemp.c')
-rw-r--r--util/libreboot-utils/mkhtemp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/util/libreboot-utils/mkhtemp.c b/util/libreboot-utils/mkhtemp.c
index 65e637e9..ced8aa96 100644
--- a/util/libreboot-utils/mkhtemp.c
+++ b/util/libreboot-utils/mkhtemp.c
@@ -95,7 +95,7 @@ main(int argc, char *argv[])
p > template && *--p == 'X'; xc++);
if (xc < 3) /* the gnu mktemp errs on less than 3 */
- err_exit(EINVAL,
+ exitf(
"template must have 3 X or more on end (12+ advised");
}
@@ -109,21 +109,21 @@ main(int argc, char *argv[])
if (tmpdir != NULL) {
rp = realpath(tmpdir, resolved);
if (rp == NULL)
- err_exit(errno, "%s", tmpdir);
+ exitf("%s", tmpdir);
tmpdir = resolved;
}
if (new_tmp_common(&fd, &s, type,
tmpdir, template) < 0)
- err_exit(errno, "%s", s);
+ exitf("%s", s);
xpledgex("stdio", NULL);
if (s == NULL)
- err_exit(EFAULT, "bad string initialisation");
+ exitf("bad string initialisation");
if (*s == '\0')
- err_exit(EFAULT, "empty string initialisation");
+ exitf("empty string initialisation");
slen(s, PATH_MAX, &len); /* Nullterminierung prüfen */
/* for good measure. (bonus: also re-checks length overflow) */
@@ -133,7 +133,7 @@ main(int argc, char *argv[])
return EXIT_SUCCESS;
err_usage:
- err_exit(EINVAL,
+ exitf(
"usage: %s [-d] [-p dir] [template]\n", lbgetprogname());
}