From ffd615858975ddb408fdc0336cfb55e597332162 Mon Sep 17 00:00:00 2001 From: sanjiyan Date: Thu, 23 Aug 2001 19:01:52 +0000 Subject: [PATCH] removed div with a shift --- fmt/fmt_8long.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmt/fmt_8long.c b/fmt/fmt_8long.c index a74b00c..66324e8 100644 --- a/fmt/fmt_8long.c +++ b/fmt/fmt_8long.c @@ -3,7 +3,7 @@ unsigned int fmt_8long(char *dest,unsigned long i) { register unsigned long len,tmp; /* first count the number of bytes needed */ - for (len=1, tmp=i; tmp>7; ++len) tmp/=8; + for (len=1, tmp=i; tmp>7; ++len) tmp>>=3; if (dest) for (tmp=i, dest+=len; ; ) { *--dest = (tmp&7)+'0';