examples/power: fix json null termination
authorDavid Hunt <david.hunt@intel.com>
Fri, 26 Apr 2019 14:04:54 +0000 (15:04 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 2 May 2019 23:41:42 +0000 (01:41 +0200)
commit8f8f876bd76f9ea996f0e80f32137aa9c2c2071a
tree2ff63f0c58c9331b0f404ef51e1b6ead4a1df4f2
parent3f1fc5f2cbc57ed719f9a1b24c8e450c5a95e8db
examples/power: fix json null termination

coverity complains about a null-termination after a read,
so we terminate once we exit the do-while read loop.

Coverity issue: 337680
Fixes: a63504a90f ("examples/power: add JSON string handling")
Cc: stable@dpdk.org
Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
examples/vm_power_manager/channel_monitor.c