Commit 8cd55cb4 authored by Paul Eggert's avatar Paul Eggert
Browse files

* fns.c (sxhash): Redo loop for clarity and to avoid wraparound warning.

parent 0bc0b309
2011-04-03 Paul Eggert <eggert@cs.ucla.edu>
* fns.c (substring_both): Remove var that is set but not used.
(sxhash): Redo loop for clarity and to avoid wraparound warning.
* eval.c (funcall_lambda): Rename local to avoid shadowing.
......@@ -4219,9 +4219,9 @@ sxhash (Lisp_Object obj, int depth)
{
double val = XFLOAT_DATA (obj);
unsigned char *p = (unsigned char *) &val;
unsigned char *e = p + sizeof val;
for (hash = 0; p < e; ++p)
hash = SXHASH_COMBINE (hash, *p);
size_t i;
for (hash = 0, i = 0; i < sizeof val; i++)
hash = SXHASH_COMBINE (hash, p[i]);
break;
}
......
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