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:22:25 +0000 (14:22 -0400)
commit753e7f42d341a09625ca05ce0940d9876fc61097
treedea1628a7f6e8664edf96f9d94808a97832fe19e
parent8e78cde2c6993d286decb80e497c1b5dd039538d
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.025448 seconds and 4 git commands to generate.