diff options
Diffstat (limited to 'apps/metadata/metadata_common.c')
-rw-r--r-- | apps/metadata/metadata_common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/metadata/metadata_common.c b/apps/metadata/metadata_common.c index 6c420d921f..1ad89d1b7a 100644 --- a/apps/metadata/metadata_common.c +++ b/apps/metadata/metadata_common.c | |||
@@ -178,6 +178,14 @@ unsigned long get_long_be(void* buf) | |||
178 | return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; | 178 | return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; |
179 | } | 179 | } |
180 | 180 | ||
181 | /* Read an unaligned 16-bit little endian short from buffer. */ | ||
182 | unsigned short get_short_be(void* buf) | ||
183 | { | ||
184 | unsigned char* p = (unsigned char*) buf; | ||
185 | |||
186 | return (p[0] << 8) | p[1]; | ||
187 | } | ||
188 | |||
181 | /* Read an unaligned 32-bit little endian long from buffer. */ | 189 | /* Read an unaligned 32-bit little endian long from buffer. */ |
182 | long get_slong(void* buf) | 190 | long get_slong(void* buf) |
183 | { | 191 | { |