Skip to content

Commit 8d071e7

Browse files
1 parent b6f778c commit 8d071e7

4 files changed

Lines changed: 18 additions & 16 deletions

File tree

flac/config/endianness.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#include <caml/memory.h>
22
#include <stdint.h>
33

4-
enum
5-
{
6-
OCAML_MM_LITTLE_ENDIAN = 0x0100,
7-
OCAML_MM_BIG_ENDIAN = 0x0001,
4+
enum {
5+
OCAML_MM_LITTLE_ENDIAN = 0x0100,
6+
OCAML_MM_BIG_ENDIAN = 0x0001,
87
};
98

10-
static const union { unsigned char bytes[2]; uint16_t value; } host_order =
11-
{ { 0, 1 } };
9+
static const union {
10+
unsigned char bytes[2];
11+
uint16_t value;
12+
} host_order = {{0, 1}};
1213

1314
CAMLprim value ocaml_mm_is_big_endian(value unit) {
1415
CAMLparam0();

opus/config/endianness.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#include <caml/memory.h>
22
#include <stdint.h>
33

4-
enum
5-
{
6-
OCAML_MM_LITTLE_ENDIAN = 0x0100,
7-
OCAML_MM_BIG_ENDIAN = 0x0001,
4+
enum {
5+
OCAML_MM_LITTLE_ENDIAN = 0x0100,
6+
OCAML_MM_BIG_ENDIAN = 0x0001,
87
};
98

10-
static const union { unsigned char bytes[2]; uint16_t value; } host_order =
11-
{ { 0, 1 } };
9+
static const union {
10+
unsigned char bytes[2];
11+
uint16_t value;
12+
} host_order = {{0, 1}};
1213

1314
CAMLprim value ocaml_mm_is_big_endian(value unit) {
1415
CAMLparam0();

opus/opus_stubs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
#ifdef BIGENDIAN
2828
// code from bits/byteswap.h (C) 1997, 1998 Free Software Foundation, Inc.
2929
#define int32le_to_native(x) \
30-
((((x)&0xff000000) >> 24) | (((x)&0x00ff0000) >> 8) | \
31-
(((x)&0x0000ff00) << 8) | (((x)&0x000000ff) << 24))
32-
#define int16le_to_native(x) ((((x) >> 8) & 0xff) | (((x)&0xff) << 8))
30+
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
31+
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
32+
#define int16le_to_native(x) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8))
3333
#else
3434
#define int32le_to_native(x) x
3535
#define int16le_to_native(x) x

speex/speex_stubs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The comment header is decoded as follows:
7575
buf[base + 3] = ((val) >> 24) & 0xff; \
7676
buf[base + 2] = ((val) >> 16) & 0xff; \
7777
buf[base + 1] = ((val) >> 8) & 0xff; \
78-
buf[base] = (val)&0xff; \
78+
buf[base] = (val) & 0xff; \
7979
} while (0)
8080

8181
void comment_init(char **comments, int *length, char *vendor_string) {

0 commit comments

Comments
 (0)