util/spkmodem-decode: do getopt first

much cleaner. do it right after zero-init memset.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-12 21:50:29 +00:00
parent 912cd99f9f
commit 995ac0bcd7
+5 -4
View File
@@ -220,10 +220,6 @@ main(int argc, char **argv)
#endif
memset(&st, 0, sizeof(st));
st.ascii_bit = 7;
st.ringpos = 0;
st.sep_pos = SAMPLES_PER_FRAME;
while ((c = getopt(argc, argv, "d")) != -1) {
if (c != 'd')
@@ -232,6 +228,11 @@ main(int argc, char **argv)
break;
}
st.ascii_bit = 7;
st.ringpos = 0;
st.sep_pos = SAMPLES_PER_FRAME;
if (host_is_big_endian())
st.swap_bytes = 1;