| 20 | } |
| 21 | |
| 22 | static u64 polymod(u64 c, int val) |
| 23 | { |
| 24 | u8 c0 = c >> 35; |
| 25 | c = ((c & 0x7ffffffff) << 5) ^ val; |
| 26 | if (c0 & 1) c ^= 0xf5dee51989; |
| 27 | if (c0 & 2) c ^= 0xa9fdca3312; |
| 28 | if (c0 & 4) c ^= 0x1bab10e32d; |
| 29 | if (c0 & 8) c ^= 0x3706b1677a; |
| 30 | if (c0 & 16) c ^= 0x644d626ffd; |
| 31 | return c; |
| 32 | } |
| 33 | |
| 34 | |
| 35 | bool descriptor_checksum(const char *descriptor, int desc_size, |
no outgoing calls
no test coverage detected