mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-28 07:45:00 +00:00
* cm.c (calccost): Turn while-do into do-while, for clarity.
This commit is contained in:
parent
6ad6792b39
commit
12ea59a297
@ -1,5 +1,7 @@
|
||||
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
|
||||
|
6
src/cm.c
6
src/cm.c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user