aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2021-01-08 11:05:32 +0200
committerArnold D. Robbins <arnold@skeeve.com>2021-01-08 11:05:32 +0200
commitd562eb482f3180dcd59a332edc91027ea3844d90 (patch)
treed90bb37b1c75a6429d961031b6a3ae08559408c0 /builtin.c
parentb4dc5fb3dc57f7fc7eaba39c5814b8bae9403b77 (diff)
downloadegawk-d562eb482f3180dcd59a332edc91027ea3844d90.tar.gz
egawk-d562eb482f3180dcd59a332edc91027ea3844d90.tar.bz2
egawk-d562eb482f3180dcd59a332edc91027ea3844d90.zip
Improve use of types throughout.
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin.c b/builtin.c
index 0d7439cc..fc5dc31e 100644
--- a/builtin.c
+++ b/builtin.c
@@ -29,7 +29,6 @@
#if defined(HAVE_FCNTL_H)
#include <fcntl.h>
#endif
-#include <math.h>
#include "random.h"
#include "floatmagic.h"
@@ -4053,7 +4052,7 @@ NODE *
do_typeof(int nargs)
{
NODE *arg;
- char *res = NULL;
+ const char *res = NULL;
bool deref = true;
NODE *dbg;
@@ -4265,6 +4264,7 @@ char *
format_nan_inf(NODE *n, char format)
{
static char buf[100];
+ double val = n->numbr;
#ifdef HAVE_MPFR
if (is_mpg_integer(n))
@@ -4284,7 +4284,6 @@ format_nan_inf(NODE *n, char format)
/* else
fallthrough */
#endif
- double val = n->numbr;
if (isnan(val)) {
strcpy(buf, signbit(val) != 0 ? "-nan" : "+nan");