| 848 | /* Read a 24 bit value from BUF and advance 3 bytes. */ |
| 849 | |
| 850 | static uint32_t |
| 851 | read_uint24 (struct dwarf_buf *buf) |
| 852 | { |
| 853 | const unsigned char *p = buf->buf; |
| 854 | |
| 855 | if (!advance (buf, 3)) |
| 856 | return 0; |
| 857 | if (buf->is_bigendian) |
| 858 | return (((uint32_t) p[0] << 16) | ((uint32_t) p[1] << 8) |
| 859 | | (uint32_t) p[2]); |
| 860 | else |
| 861 | return (((uint32_t) p[2] << 16) | ((uint32_t) p[1] << 8) |
| 862 | | (uint32_t) p[0]); |
| 863 | } |
| 864 | |
| 865 | /* Read a uint32 from BUF and advance 4 bytes. */ |
| 866 |
no test coverage detected