| 865 | /* Read a uint32 from BUF and advance 4 bytes. */ |
| 866 | |
| 867 | static uint32_t |
| 868 | read_uint32 (struct dwarf_buf *buf) |
| 869 | { |
| 870 | const unsigned char *p = buf->buf; |
| 871 | |
| 872 | if (!advance (buf, 4)) |
| 873 | return 0; |
| 874 | if (buf->is_bigendian) |
| 875 | return (((uint32_t) p[0] << 24) | ((uint32_t) p[1] << 16) |
| 876 | | ((uint32_t) p[2] << 8) | (uint32_t) p[3]); |
| 877 | else |
| 878 | return (((uint32_t) p[3] << 24) | ((uint32_t) p[2] << 16) |
| 879 | | ((uint32_t) p[1] << 8) | (uint32_t) p[0]); |
| 880 | } |
| 881 | |
| 882 | /* Read a uint64 from BUF and advance 8 bytes. */ |
| 883 |
no test coverage detected