Search:
Login
Help/Guide
About Trac
Register
Forgot your password?
Preferences
Wiki
Timeline
Roadmap
Browse Source
View Tickets
Search
Context Navigation
←
Previous Change
Next Change
→
Changeset
5442:cc2334fdf126
for
hash.c
View differences
inline
side by side
Show
lines around each change
Ignore:
Blank lines
Case changes
White space changes
Timestamp:
2008-07-02 01:06:10 (
5 months
ago)
Author:
Rocco Rutte <pdmef@…>
Branch:
HEAD
Message:
Use casts to avoid triggering integer overflow detection in hash function
Files:
1 modified
hash.c
(modified)
(
2 diffs
)
Legend:
Unmodified
Added
Removed
hash.c
r4640
r5442
31
31
int hash_string (const unsigned char *s, int n)
32
32
{
33
int h = 0;
33
unsigned
int h = 0;
34
34
35
35
#if 0
…
…
43
43
#endif
44
44
45
return (
h % n);
45
return (
signed) (
h % n);
46
46
}
47
47
Download in other formats:
Unified Diff
Zip Archive