break;
case 'w':
- {
- char *endp;
- double t = strtod(optarg, &endp);
- if(optarg[0] != '\0' && *endp == '\0')
{
- opt_timeout = t;
- }
- else{
- fprintf (stderr, "Ignoring invalid timeout: %s\n",
- optarg);
+ char *endp = NULL;
+ double t = strtod (optarg, &endp);
+ if ((optarg[0] != 0) && (endp != NULL) && (*endp == 0))
+ opt_timeout = t;
+ else
+ fprintf (stderr, "Ignoring invalid timeout: %s\n",
+ optarg);
}
-
break;
- }
case 'I':
{
}
#endif
- setlocale(LC_ALL, "");
+ setlocale(LC_ALL, "");
optind = read_options (argc, argv);
#if !_POSIX_SAVED_IDS