util/spkmodem-decode: init argv0 before pledge

otherwise, it'll be empty/undefined

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-12 21:49:54 +00:00
parent a60be4028a
commit a0c8fd519e
+2 -2
View File
@@ -210,6 +210,8 @@ main(int argc, char **argv)
struct decoder_state st;
int c;
argv0 = argv[0];
#if defined (__OpenBSD__) && defined(OpenBSD)
#if OpenBSD >= 509
if (pledge("stdio", NULL) == -1)
@@ -223,8 +225,6 @@ main(int argc, char **argv)
st.ringpos = 0;
st.sep_pos = SAMPLES_PER_FRAME;
argv0 = argv[0];
while ((c = getopt(argc, argv, "d")) != -1) {
if (c != 'd')
usage();