lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180411101529.GA12068@yu-chen.sh.intel.com>
Date:   Wed, 11 Apr 2018 18:15:29 +0800
From:   Yu Chen <yu.c.chen@...el.com>
To:     Artem Bityutskiy <dedekind1@...il.com>
Cc:     Len Brown <lenb@...nel.org>,
        "Rafael J . Wysocki" <rjw@...ysocki.net>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH][v2] tools/power turbostat: if --max_loop, print for
 specific time of loops

On Wed, Apr 11, 2018 at 12:29:04PM +0300, Artem Bityutskiy wrote:
> 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.
Got your point, will change it.
> 
> Artem.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ