Skip to content

Commit

Permalink
perf: Removed unnecessary test, since argument(0) should never be called
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregungory committed Feb 25, 2024
1 parent 3eb035a commit 2aaebfa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/common/calfunc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef lint
static const char RCSid[] = "$Id: calfunc.c,v 2.28 2022/04/08 23:32:25 greg Exp $";
static const char RCSid[] = "$Id: calfunc.c,v 2.29 2024/02/25 18:36:27 greg Exp $";
#endif
/*
* calfunc.c - routines for calcomp using functions.
Expand All @@ -22,7 +22,7 @@ static const char RCSid[] = "$Id: calfunc.c,v 2.28 2022/04/08 23:32:25 greg Exp

/* bits in argument flag (better be right!) */
#define AFLAGSIZ (8*sizeof(unsigned long))
#define ALISTSIZ 8 /* maximum saved argument list */
#define ALISTSIZ 10 /* maximum saved argument list */

typedef struct activation {
char *name; /* function name */
Expand Down Expand Up @@ -203,9 +203,6 @@ argument(int n) /* return nth argument for active function */
EPNODE *ep = NULL;
double aval;

if (!n) /* asking for # arguments? */
return((double)nargum());

if (!actp | (--n < 0)) {
eputs("Bad call to argument!\n");
quit(1);
Expand Down

0 comments on commit 2aaebfa

Please # to comment.