mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-21 06:03:12 +00:00
Make sure to check argc before use argv.
This commit is contained in:
parent
76f3169ec4
commit
b401af895c
@ -366,9 +366,9 @@ int transfer_bytes(struct radio_state *radios)
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
if (argv[1]) {
|
||||
if (1 < argc) {
|
||||
chars_per_ms=atol(argv[1]);
|
||||
if (argv[2])
|
||||
if (2 < argc)
|
||||
ber=atol(argv[2]);
|
||||
}
|
||||
fprintf(stderr, "Sending %d bytes per ms\n", chars_per_ms);
|
||||
|
Loading…
Reference in New Issue
Block a user