Re: [PATCH] tools: perf: prefer clarity in setup_pager

2014-07-07 Thread Michal Nazarewicz
On Sun, Jul 06 2014, Michael Lentine wrote: > Unless I'm missing something this removes defaulting the pager to cat > if nothing is found which is very useful for devices/oses without less > or pager. The last two conditions are merged together, i.e. if (!pager) pager = "ca

Re: [PATCH] tools: perf: prefer clarity in setup_pager

2014-07-06 Thread Stephane Eranian
On Mon, Jul 7, 2014 at 2:40 AM, Michael Lentine wrote: > Unless I'm missing something this removes defaulting the pager to cat if > nothing is found which is very useful for devices/oses without less or > pager. > > I think you are correct Michael. I don't quite understand the value of this patch.

[PATCH] tools: perf: prefer clarity in setup_pager

2014-07-06 Thread Michal Nazarewicz
“!(pager || access(…))” is indeed pretty smart way to write “!pager && access(…) == 0” but other than being clever it gives no advantages and merely confuses the reader who needs to wonder what is actually going on. As such, replace the checks with much cleaner ones. Also, while at it, merge the