diff --git a/src/console/vtxprintf.c b/src/console/vtxprintf.c index 872b48996f..4fc6f35bd1 100644 --- a/src/console/vtxprintf.c +++ b/src/console/vtxprintf.c @@ -8,18 +8,6 @@ #include #include -#if !CONFIG_ARCH_MIPS -#define SUPPORT_64BIT_INTS -#endif - -#ifdef SUPPORT_64BIT_INTS -typedef unsigned long long unsigned_longest_int; -typedef long long longest_int; -#else -typedef unsigned long unsigned_longest_int; -typedef long longest_int; -#endif - /* haha, don't need ctype.c */ #define isdigit(c) ((c) >= '0' && (c) <= '9') #define is_digit isdigit @@ -43,8 +31,7 @@ static int skip_atoi(const char **s) #define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ static int number(void (*tx_byte)(unsigned char byte), - unsigned_longest_int num, int base, - int size, int precision, int type) + unsigned long long num, int base, int size, int precision, int type) { char c,sign,tmp[66]; const char *digits="0123456789abcdefghijklmnopqrstuvwxyz"; @@ -60,7 +47,7 @@ static int number(void (*tx_byte)(unsigned char byte), c = (type & ZEROPAD) ? '0' : ' '; sign = 0; if (type & SIGN) { - if ((longest_int)num < 0) { + if ((signed long long)num < 0) { sign = '-'; num = -num; size--; @@ -117,7 +104,7 @@ static int number(void (*tx_byte)(unsigned char byte), int vtxprintf(void (*tx_byte)(unsigned char byte), const char *fmt, va_list args) { int len; - unsigned_longest_int num; + unsigned long long num; int i, base; const char *s; @@ -233,13 +220,10 @@ repeat: continue; case 'n': -#ifdef SUPPORT_64BIT_INTS if (qualifier == 'L') { long long *ip = va_arg(args, long long *); *ip = count; - } else -#endif - if (qualifier == 'l') { + } else if (qualifier == 'l') { long * ip = va_arg(args, long *); *ip = count; } else { @@ -277,12 +261,9 @@ repeat: --fmt; continue; } -#ifdef SUPPORT_64BIT_INTS if (qualifier == 'L') { num = va_arg(args, unsigned long long); - } else -#endif - if (qualifier == 'l') { + } else if (qualifier == 'l') { num = va_arg(args, unsigned long); } else if (qualifier == 'z') { num = va_arg(args, size_t);