Fix: sink.ctf.fs: writing 64bit real number as 32bit
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 7 May 2019 19:39:41 +0000 (15:39 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 8 May 2019 18:08:30 +0000 (14:08 -0400)
commit263e358238d2c002642fd3a6f6122951956e3547
tree419d964cf4b7927e4be4fb74d665b660a2dbeaad
parent6c911f6a025e0a4caad24300ef67ad324d2155e1
Fix: sink.ctf.fs: writing 64bit real number as 32bit

Both 32bit and 64bit Trace IR real numbers are written as 32bit CTF
floats with the `bt_ctfser_write_float32()`. This is most probably a
copy-paste error.

To fix this, use the `bt_ctfser_write_float64()` in the else branch instead.

Coverity report:
  CID 1401207 (#1 of 1): Identical code for different branches (IDENTICAL_BRANCHES)
  identical_branches: The same code is executed regardless of whether
  fc->base.size == 32U is true, because the 'then' and 'else' branches
  are identical. Should one of the branches be modified, or the entire
  'if' statement replaced?

Reported-by: Coverity (1401207) Identical code for different branches
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: I462fd47e968e39f5878431d5ac6cbcbbf1d2ffcf
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1268
Tested-by: jenkins
Reviewed-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
plugins/ctf/fs-sink/fs-sink-stream.c
This page took 0.02541 seconds and 4 git commands to generate.