Changeset 6a5335 for server/src/core/ngx_crc32.h
- Timestamp:
- 01/05/08 18:16:49 (4 years ago)
- Branches:
- master-v0.7, master-v0.6, memcached_hash, upstream_count_limit
- Children:
- 7af0c7
- Parents:
- 8760a9
- git-author:
- Tomash Brechko <tomash.brechko@…> (01/05/08 18:11:55)
- git-committer:
- Tomash Brechko <tomash.brechko@…> (01/05/08 18:16:49)
- File:
-
- 1 edited
-
server/src/core/ngx_crc32.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
server/src/core/ngx_crc32.h
r0019fc r6a5335 50 50 51 51 52 ngx_int_t ngx_crc32_init(void); 52 #define ngx_crc32_init(crc) \ 53 crc = 0xffffffff 54 55 56 static ngx_inline void 57 ngx_crc32_update(uint32_t *crc, u_char *p, size_t len) 58 { 59 uint32_t c; 60 61 c = *crc; 62 63 while (len--) { 64 c = ngx_crc32_table256[(c ^ *p++) & 0xff] ^ (c >> 8); 65 } 66 67 *crc = c; 68 } 69 70 71 #define ngx_crc32_final(crc) \ 72 crc ^= 0xffffffff 73 74 75 ngx_int_t ngx_crc32_table_init(void); 53 76 54 77
Note: See TracChangeset
for help on using the changeset viewer.
