aboutsummaryrefslogtreecommitdiffstats
path: root/src/fns.c
diff options
context:
space:
mode:
authorPaul Eggert2011-04-02 22:56:37 -0700
committerPaul Eggert2011-04-02 22:56:37 -0700
commit8cd55cb48a097813ff13b8dc5e6570dd32fa1495 (patch)
treeef2c1bec604a95923619e847d9f1ca80ac283bc6 /src/fns.c
parent0bc0b309f6023bbfe14683095bea3bbf536b4602 (diff)
downloademacs-8cd55cb48a097813ff13b8dc5e6570dd32fa1495.tar.gz
emacs-8cd55cb48a097813ff13b8dc5e6570dd32fa1495.zip
* fns.c (sxhash): Redo loop for clarity and to avoid wraparound warning.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fns.c b/src/fns.c
index 8346dbc690a..c45d9e31ef2 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -4219,9 +4219,9 @@ sxhash (Lisp_Object obj, int depth)
4219 { 4219 {
4220 double val = XFLOAT_DATA (obj); 4220 double val = XFLOAT_DATA (obj);
4221 unsigned char *p = (unsigned char *) &val; 4221 unsigned char *p = (unsigned char *) &val;
4222 unsigned char *e = p + sizeof val; 4222 size_t i;
4223 for (hash = 0; p < e; ++p) 4223 for (hash = 0, i = 0; i < sizeof val; i++)
4224 hash = SXHASH_COMBINE (hash, *p); 4224 hash = SXHASH_COMBINE (hash, p[i]);
4225 break; 4225 break;
4226 } 4226 }
4227 4227