summaryrefslogtreecommitdiff
path: root/src/casetab.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-04-09 15:31:34 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-04-09 15:31:34 -0700
commitf9a68bc5fccc6e3b48d59199addaeeaf2a92a8b0 (patch)
tree525474f88e82fb7255b6fed42185559101858922 /src/casetab.c
parent9248994de4e597941230d9cb07a50df994c7825b (diff)
downloademacs-f9a68bc5fccc6e3b48d59199addaeeaf2a92a8b0.tar.gz
* casetab.c (set_identity, shuffle): Likewise.
Diffstat (limited to 'src/casetab.c')
-rw-r--r--src/casetab.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/casetab.c b/src/casetab.c
index 56f6b065358..9a1accf6940 100644
--- a/src/casetab.c
+++ b/src/casetab.c
@@ -191,7 +191,8 @@ set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
{
if (NATNUMP (elt))
{
- int from, to;
+ int from;
+ unsigned to;
if (CONSP (c))
{
@@ -200,7 +201,7 @@ set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
}
else
from = to = XINT (c);
- for (; from <= to; from++)
+ for (to++; from < to; from++)
CHAR_TABLE_SET (table, from, make_number (from));
}
}
@@ -215,7 +216,8 @@ shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
{
if (NATNUMP (elt))
{
- int from, to;
+ int from;
+ unsigned to;
if (CONSP (c))
{
@@ -225,7 +227,7 @@ shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
else
from = to = XINT (c);
- for (; from <= to; from++)
+ for (to++; from < to; from++)
{
Lisp_Object tem = Faref (table, elt);
Faset (table, elt, make_number (from));