Bug #1412 » 0001-Fix-Handling-of-0-length-array-sequence-alignment.patch
types/array.c | ||
---|---|---|
#include <babeltrace/compiler.h>
|
||
#include <babeltrace/format.h>
|
||
#include <babeltrace/types.h>
|
||
#include <babeltrace/ctf/types.h>
|
||
#include <inttypes.h>
|
||
static
|
||
... | ... | |
uint64_t i;
|
||
int ret;
|
||
/* No need to align, because the first field will align itself. */
|
||
/* Need to align explicitly to support 0-length arrays. */
|
||
if (!ctf_align_pos(ctf_pos(pos), array_declaration->p.alignment))
|
||
return -EFAULT;
|
||
for (i = 0; i < array_declaration->len; i++) {
|
||
struct bt_definition *field =
|
||
g_ptr_array_index(array_definition->elems, i);
|
types/sequence.c | ||
---|---|---|
#include <babeltrace/compiler.h>
|
||
#include <babeltrace/format.h>
|
||
#include <babeltrace/types.h>
|
||
#include <babeltrace/ctf/types.h>
|
||
#include <inttypes.h>
|
||
static
|
||
... | ... | |
sequence_definition->p.scope,
|
||
name, i, NULL);
|
||
}
|
||
/* Need to align explicitly to support 0-length sequences. */
|
||
if (!ctf_align_pos(ctf_pos(pos), sequence_declaration->p.alignment))
|
||
return -EFAULT;
|
||
for (i = 0; i < len; i++) {
|
||
struct bt_definition **field;
|
||
- « Previous
- 1
- …
- 3
- 4
- 5
- Next »