mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-21 19:26:22 +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;
|
struct decoder_state st;
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
|
argv0 = argv[0];
|
||||||
|
|
||||||
#if defined (__OpenBSD__) && defined(OpenBSD)
|
#if defined (__OpenBSD__) && defined(OpenBSD)
|
||||||
#if OpenBSD >= 509
|
#if OpenBSD >= 509
|
||||||
if (pledge("stdio", NULL) == -1)
|
if (pledge("stdio", NULL) == -1)
|
||||||
@@ -223,8 +225,6 @@ main(int argc, char **argv)
|
|||||||
st.ringpos = 0;
|
st.ringpos = 0;
|
||||||
st.sep_pos = SAMPLES_PER_FRAME;
|
st.sep_pos = SAMPLES_PER_FRAME;
|
||||||
|
|
||||||
argv0 = argv[0];
|
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "d")) != -1) {
|
while ((c = getopt(argc, argv, "d")) != -1) {
|
||||||
if (c != 'd')
|
if (c != 'd')
|
||||||
usage();
|
usage();
|
||||||
|
|||||||
Reference in New Issue
Block a user