Commit 12ea59a2 authored by Paul Eggert's avatar Paul Eggert
Browse files

* cm.c (calccost): Turn while-do into do-while, for clarity.

parent 6ad6792b
2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
 
* cm.c (calccost): Turn while-do into do-while, for clarity.
Fix more problems found by GCC 4.5.2's static checks.
 
* coding.c (encode_coding_raw_text): Avoid unnecessary test
......@@ -214,8 +214,9 @@ calccost (struct tty_display_info *tty,
}
totalcost = c * deltay;
if (doit)
while (--deltay >= 0)
do
emacs_tputs (tty, p, 1, cmputc);
while (0 < --deltay);
x:
if ((deltax = dstx - srcx) == 0)
goto done;
......@@ -296,8 +297,9 @@ calccost (struct tty_display_info *tty,
}
totalcost += c * deltax;
if (doit)
while (--deltax >= 0)
do
emacs_tputs (tty, p, 1, cmputc);
while (0 < --deltax);
done:
return totalcost;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment