From S.Ellison at LGCGroup.com  Fri Feb 16 17:03:00 2018
From: S.Ellison at LGCGroup.com (S Ellison)
Date: Fri, 16 Feb 2018 16:03:00 +0000
Subject: [Rd] Unnecessary lines in stem.c?
Message-ID: <1A8C1289955EF649A09086A153E267240C3FD9146F@GBTEDVPEXCMB04.corp.lgc-group.com>

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 use...{{dropped:8}}



[Rd] Unnecessary lines in stem.c?
S Ellison