mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-13 23:09:40 +02:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user