summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2018-10-16 21:46:44 +0200
committerMarian Csontos <mcsontos@redhat.com>2019-03-05 12:15:40 +0100
commitf0f68791f31c8cf0ca2c4f0bbee86dd37a69494f (patch)
tree5b727c54138a08e686e814cb667f30a3e33614c1
parentb39c26ddc335e308c10777ea423f341cb9e783b8 (diff)
downloadlvm2-f0f68791f31c8cf0ca2c4f0bbee86dd37a69494f.tar.gz
cov: shutdown warning
Since previous patch reverted coverity patch as this case is intentional, provide override this coverity warning. (cherry picked from commit 05b57748274492aa76e530e4513e5f8e9a39a735)
-rw-r--r--libdm/libdm-stats.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index 6b4e3d81e..307859633 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -1009,6 +1009,7 @@ static int _stats_parse_list(struct dm_stats *dms, const char *resp)
* dm_task_get_message_response() returns a 'const char *' but
* since fmemopen also permits "w" it expects a 'char *'.
*/
+ /* coverity[alloc_strlen] intentional */
if (!(list_rows = fmemopen((char *)resp, strlen(resp), "r")))
return_0;
@@ -1240,6 +1241,7 @@ static int _stats_parse_region(struct dm_stats *dms, const char *resp,
* dm_task_get_message_response() returns a 'const char *' but
* since fmemopen also permits "w" it expects a 'char *'.
*/
+ /* coverity[alloc_strlen] intentional */
stats_rows = fmemopen((char *)resp, strlen(resp), "r");
if (!stats_rows)
goto_bad;