mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user