X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=formats%2Fctf%2Ftypes%2Ffloat.c;fp=formats%2Fctf%2Ftypes%2Ffloat.c;h=5fcae00451697bcd520fa6034f3471e84ccd7612;hp=030ac167c90dc5e431d593742c5dd7d85f9db711;hb=0cdd2d2c4bfebf5c6a52136cdff2442d3350743e;hpb=192afc47e49772e745686bc9a430ea4b25c797c7 diff --git a/formats/ctf/types/float.c b/formats/ctf/types/float.c index 030ac167..5fcae004 100644 --- a/formats/ctf/types/float.c +++ b/formats/ctf/types/float.c @@ -200,8 +200,7 @@ int ctf_float_read(struct bt_stream_pos *ppos, struct bt_definition *definition) ctf_init_pos(&destp, NULL, -1, O_RDWR); mmap_align_set_addr(&mma, (char *) u.bits); destp.base_mma = &mma; - destp.packet_size = sizeof(u) * CHAR_BIT; - destp.content_size = sizeof(u) * CHAR_BIT; + destp.content_size = destp.packet_size = sizeof(u) * CHAR_BIT; if (!ctf_align_pos(pos, float_declaration->p.alignment)) { ret = -EFAULT; goto end_unref; @@ -260,8 +259,7 @@ int ctf_float_write(struct bt_stream_pos *ppos, struct bt_definition *definition ctf_init_pos(&srcp, NULL, -1, O_RDONLY); mmap_align_set_addr(&mma, (char *) u.bits); srcp.base_mma = &mma; - srcp.packet_size = sizeof(u) * CHAR_BIT; - srcp.content_size = sizeof(u) * CHAR_BIT; + srcp.content_size = srcp.packet_size = sizeof(u) * CHAR_BIT; switch (float_declaration->mantissa->len + 1) { case FLT_MANT_DIG: u.vf = float_definition->value;