From: Zeev Suraski Date: Fri, 2 Jun 2000 12:24:24 +0000 (+0000) Subject: Small optimization X-Git-Tag: PRE_EIGHT_BYTE_ALLOC_PATCH~144 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab36e22aebb8c87cf38d4f1dd78ea7d0682284a1;p=php Small optimization --- diff --git a/ext/standard/math.c b/ext/standard/math.c index 5663634e02..fef8cf0388 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -636,9 +636,12 @@ char *_php_math_number_format(double d,int dec,char dec_point,char thousand_sep) return tmpbuf; } - for (t=tmpbuf; *t; t++) { - if (*t=='.') { - *t = dec_point; + if (dec_point!='.') { + for (t=tmpbuf; *t; t++) { + if (*t=='.') { + *t = dec_point; + break; + } } } if (dec) {