mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-20 15:03:44 +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
|
#endif
|
||||||
|
|
||||||
memset(&st, 0, sizeof(st));
|
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) {
|
while ((c = getopt(argc, argv, "d")) != -1) {
|
||||||
if (c != 'd')
|
if (c != 'd')
|
||||||
@@ -232,6 +228,11 @@ main(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
st.ascii_bit = 7;
|
||||||
|
|
||||||
|
st.ringpos = 0;
|
||||||
|
st.sep_pos = SAMPLES_PER_FRAME;
|
||||||
|
|
||||||
if (host_is_big_endian())
|
if (host_is_big_endian())
|
||||||
st.swap_bytes = 1;
|
st.swap_bytes = 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user