On Tue, 2018-04-10 at 22:51 +0800, Yu Chen wrote: > + case 't': > + { > + int loops = strtod(optarg, NULL); > + > + if (loops <= 0) { > + fprintf(outf, "loops %d should be > positive number\n", > + iterations); > + exit(2); > + } > + iterations = loops; > + }
What is the point of the additional {} scope and the 'loops' variable in it? You could use the 'iterations' variable directly and simplify the code. Artem.