From tomas.kalibera at gmail.com  Tue Feb 20 15:11:34 2018
From: tomas.kalibera at gmail.com (Tomas Kalibera)
Date: Tue, 20 Feb 2018 15:11:34 +0100
Subject: [Rd] Unnecessary lines in stem.c?
In-Reply-To: <1A8C1289955EF649A09086A153E267240C3FD9146F@GBTEDVPEXCMB04.corp.lgc-group.com>
References: <1A8C1289955EF649A09086A153E267240C3FD9146F@GBTEDVPEXCMB04.corp.lgc-group.com>
Message-ID: <834e5801-e1ff-2bb1-cfcf-4b5da4d6807c@gmail.com>

Thanks! Cleaned up in R-devel,
Tomas

On 02/16/2018 05:03 PM, S Ellison wrote:
> A discussion on r-help led me to look at stem.c at
> https://github.com/wch/r-source/blob/trunk/src/library/graphics/src/stem.c
>
> Lines 76-77 appear superfluous. They sit inside a condition, and set mu, as follows:
> 	if (k*(k-4)*(k-8) == 0) mu = 5;
> 	if ((k-1)*(k-5)*(k-6) == 0) mu = 20;
>
> But mu is set unconditionally to 10 on line 84, and that is followed by conditional assignments (on line 85-6) identical to lines 76-77.
>
> It looks like a couple of lines got left inside a condition that are no longer needed there. If that is correct, is it worth removing the superfluous lines, for future coders' benefit?
>
> S Ellison
>   
>
>
> *******************************************************************
> This email and any attachments are confidential. Any u...{{dropped:7}}



[Rd] Unnecessary lines in stem.c?
Tomas Kalibera