From f2cbb03a378aa48f2e08b64877d54da3fab4ea6a Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 23 Oct 2009 03:16:08 +0200 Subject: *: optimize most of isXXXXX() macros text data bss dec hex filename 824164 453 6812 831429 cafc5 busybox_old 823730 453 6812 830995 cae13 busybox_unstripped Signed-off-by: Denys Vlasenko --- coreutils/od.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'coreutils') diff --git a/coreutils/od.c b/coreutils/od.c index e4179a36d..228db19ac 100644 --- a/coreutils/od.c +++ b/coreutils/od.c @@ -20,9 +20,6 @@ #include "dump.h" -#define isdecdigit(c) isdigit(c) -#define ishexdigit(c) (isxdigit)(c) - static void odoffset(dumper_t *dumper, int argc, char ***argvp) { @@ -51,8 +48,8 @@ odoffset(dumper_t *dumper, int argc, char ***argvp) if ((*p != '+') && (argc < 2 - || (!isdecdigit(p[0]) - && ((p[0] != 'x') || !ishexdigit(p[1]))))) + || (!isdigit(p[0]) + && ((p[0] != 'x') || !isxdigit(p[1]))))) return; base = 0; @@ -62,7 +59,7 @@ odoffset(dumper_t *dumper, int argc, char ***argvp) */ if (p[0] == '+') ++p; - if (p[0] == 'x' && ishexdigit(p[1])) { + if (p[0] == 'x' && isxdigit(p[1])) { ++p; base = 16; } else if (p[0] == '0' && p[1] == 'x') { @@ -72,10 +69,10 @@ odoffset(dumper_t *dumper, int argc, char ***argvp) /* skip over the number */ if (base == 16) - for (num = p; ishexdigit(*p); ++p) + for (num = p; isxdigit(*p); ++p) continue; else - for (num = p; isdecdigit(*p); ++p) + for (num = p; isdigit(*p); ++p) continue; /* check for no number */ -- cgit v1.2.3