gget

gget Commit Details

Date:2016-08-12 18:11:54 (3 years 11 months ago)
Author:Grégory Soutadé
Branch:master
Commit:bfdb3b4161b6d14fc0d6c6a08f3d5dc4ccd55b20
Parents: c3c7945ddf044ecafd4eb2bbd8f90b7ff87d18ff
Message:Add checks for int parameters values

Changes:
Mgget.c (2 diffs)

File differences

gget.c
515515
516516
517517
518
518
519
520
521
522
523
519524
520525
521526
......
525530
526531
527532
528
533
534
535
536
537
538
529539
530540
531541
while ((opt = getopt(argc, argv, "hn:l:o:u:qm:")) != -1) {
switch (opt) {
case 'n':
nb_threads = atoi(optarg);
nb_threads = strtoul(optarg, &endptr, 0);
if (*endptr)
{
usage(argv[0]);
return 1;
}
if (nb_threads == 0)
nb_threads = DEFAULT_NB_THREADS;
else if (nb_threads > MAX_NB_THREADS)
}
break;
case 'l':
max_speed = atoi(optarg);
max_speed = strtoul(optarg, &endptr, 0);
if (*endptr)
{
usage(argv[0]);
return 1;
}
break;
case 'm':
if (strlen(optarg) > 1)

Archive Download the corresponding diff file

Branches

Tags