summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2017-11-28 08:03:01 +0000
committerotto <otto@openbsd.org>2017-11-28 08:03:01 +0000
commit839c473a2903c2038e90a8aa66ef3831b842fa66 (patch)
tree619abd7e6524386b0547e3e615ed316c29e27e3c
parentGNU ld has prefixed the contents of .gnu.warning.SYMBOL sections (diff)
downloadwireguard-openbsd-839c473a2903c2038e90a8aa66ef3831b842fa66.tar.xz
wireguard-openbsd-839c473a2903c2038e90a8aa66ef3831b842fa66.zip
garbage collect a few functions that are not really needed; from kshe
-rw-r--r--usr.bin/dc/bcode.c33
1 files changed, 6 insertions, 27 deletions
diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c
index e38c7a6424f..760d816c971 100644
--- a/usr.bin/dc/bcode.c
+++ b/usr.bin/dc/bcode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcode.c,v 1.52 2017/11/27 21:32:33 tom Exp $ */
+/* $OpenBSD: bcode.c,v 1.53 2017/11/28 08:03:01 otto Exp $ */
/*
* Copyright (c) 2003, Otto Moerbeek <otto@drijf.net>
@@ -102,11 +102,8 @@ static void equal_numbers(void);
static void less_numbers(void);
static void lesseq_numbers(void);
static void equal(void);
-static void not_equal(void);
static void less(void);
-static void not_less(void);
static void greater(void);
-static void not_greater(void);
static void not_compare(void);
static bool compare_numbers(enum bcode_compare, struct number *,
struct number *);
@@ -1204,7 +1201,7 @@ bexp(void)
negate(p);
rscale = bmachine.scale;
} else {
- /* Posix bc says min(a.scale * b, max(a.scale, scale) */
+ /* Posix bc says min(a.scale * b, max(a.scale, scale)) */
u_long b;
u_int m;
@@ -1411,12 +1408,6 @@ lesseq_numbers(void)
}
static void
-not_equal(void)
-{
- compare(BCODE_NOT_EQUAL);
-}
-
-static void
less(void)
{
compare(BCODE_LESS);
@@ -1427,39 +1418,27 @@ not_compare(void)
{
switch (readch()) {
case '<':
- not_less();
+ compare(BCODE_NOT_LESS);
break;
case '>':
- not_greater();
+ compare(BCODE_NOT_GREATER);
break;
case '=':
- not_equal();
+ compare(BCODE_NOT_EQUAL);
break;
default:
unreadch();
- (void)fprintf(stderr, "! command is deprecated\n");
+ warnx("! command is deprecated\n");
break;
}
}
static void
-not_less(void)
-{
- compare(BCODE_NOT_LESS);
-}
-
-static void
greater(void)
{
compare(BCODE_GREATER);
}
-static void
-not_greater(void)
-{
- compare(BCODE_NOT_GREATER);
-}
-
static bool
compare_numbers(enum bcode_compare type, struct number *a, struct number *b)
{