Changeset b2ee119f in rtems
- Timestamp:
- 12/15/14 07:01:59 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 5063e1a
- Parents:
- f42d429
- git-author:
- Sebastian Huber <sebastian.huber@…> (12/15/14 07:01:59)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (12/15/14 07:27:32)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/include/sys/endian.h
rf42d429 rb2ee119f 92 92 uint8_t const *p = (uint8_t const *)pp; 93 93 94 return (( p[0] << 8) | p[1]);94 return (((unsigned)p[0] << 8) | p[1]); 95 95 } 96 96 … … 100 100 uint8_t const *p = (uint8_t const *)pp; 101 101 102 return (((unsigned)p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]); 102 return (((uint32_t)p[0] << 24) | ((uint32_t)p[1] << 16) | 103 ((uint32_t)p[2] << 8) | p[3]); 103 104 } 104 105 … … 116 117 uint8_t const *p = (uint8_t const *)pp; 117 118 118 return (( p[1] << 8) | p[0]);119 return (((unsigned)p[1] << 8) | p[0]); 119 120 } 120 121 … … 124 125 uint8_t const *p = (uint8_t const *)pp; 125 126 126 return (((unsigned)p[3] << 24) | (p[2] << 16) | (p[1] << 8) | p[0]); 127 return (((uint32_t)p[3] << 24) | ((uint32_t)p[2] << 16) | 128 ((uint32_t)p[1] << 8) | p[0]); 127 129 } 128 130
Note: See TracChangeset
for help on using the changeset viewer.