From 37572bc2174432df133a8d2fed2cded0a4fcbd54 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 7 May 2017 17:15:16 -0400 Subject: [PATCH] command: Only implement 16bit signed conversion on AVR On regular 32bit machines there is no need to implement explicit signed conversion on 16bit integers. Signed-off-by: Kevin O'Connor --- src/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command.c b/src/command.c index a5306f3b..6ddd7eb7 100644 --- a/src/command.c +++ b/src/command.c @@ -144,7 +144,7 @@ _sendf(uint8_t parserid, ...) case PT_uint16: case PT_int16: case PT_byte: - if (t >= PT_uint16) + if (sizeof(v) > sizeof(int) && t >= PT_uint16) if (t == PT_int16) v = (int32_t)va_arg(args, int); else