From: Tobias Oetiker Date: Mon, 2 May 2005 19:33:53 +0000 (+0000) Subject: pow is alreay used as a function ... so lets call it power instead X-Git-Tag: 1.2.2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4de26a9d150a48315679771e112a007ea7276ea;p=thirdparty%2Frrdtool-1.x.git pow is alreay used as a function ... so lets call it power instead git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@476 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/strftime.c b/src/strftime.c index f349bbf4..3fb860f6 100644 --- a/src/strftime.c +++ b/src/strftime.c @@ -278,7 +278,7 @@ typedef void *va_list; * */ -static int pow[5] = { 1, 10, 100, 1000, 10000 }; +static int powers[5] = { 1, 10, 100, 1000, 10000 }; /** * static void strfmt(char *str, char *fmt); @@ -316,8 +316,8 @@ static void strfmt(char *str, const char *fmt, ...) ival = va_arg(vp, int); while (ilen) { - ival %= pow[ilen--]; - *str++ = (char)('0' + ival / pow[ilen]); + ival %= powers[ilen--]; + *str++ = (char)('0' + ival / powers[ilen]); } } }