From a2e7413d229812ff123cb8864747558b270498f1 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 6 Jun 2013 23:11:43 +0200 Subject: [PATCH] More efficient dtostrf() emulation on ARM --- hardware/arduino/sam/cores/arduino/avr/dtostrf.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hardware/arduino/sam/cores/arduino/avr/dtostrf.c b/hardware/arduino/sam/cores/arduino/avr/dtostrf.c index 1b5884580..51541739c 100644 --- a/hardware/arduino/sam/cores/arduino/avr/dtostrf.c +++ b/hardware/arduino/sam/cores/arduino/avr/dtostrf.c @@ -20,11 +20,8 @@ char *dtostrf (double val, signed char width, unsigned char prec, char *sout) { char fmt[20]; - if (width<0) { - sprintf(fmt, "%%-%d.%df", width, prec); - } else { - sprintf(fmt, "%%%d.%df", width, prec); - } + sprintf(fmt, "%%%d.%df", width, prec); sprintf(sout, fmt, val); return sout; } +