mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
wget.c: replace deprecated gets with safe fgets
This commit is contained in:
parent
fbd78a7e3b
commit
dacef46b03
@ -169,14 +169,14 @@ PROCESS_THREAD(wget_process, ev, data)
|
||||
strcpy(url, contiki_argv[1]);
|
||||
puts(url);
|
||||
} else {
|
||||
gets(url);
|
||||
fgets(url, sizeof(url), stdin);
|
||||
}
|
||||
fputs("Save as:", stdout);
|
||||
if(contiki_argc > 2) {
|
||||
strcpy(name, contiki_argv[2]);
|
||||
puts(name);
|
||||
} else {
|
||||
gets(name);
|
||||
fgets(name, sizeof(name), stdin);
|
||||
}
|
||||
file = cfs_open(name, CFS_WRITE);
|
||||
if(file == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user