mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-09 01:18:39 +03:00
revert "cov: dm stats missed terminating null"
This reverts commit20971f7034
as the parsing of 'dmstatus' started to fail on present \0 char. (cherry picked from commit6179cab877
)
This commit is contained in:
parent
d1ae1455b4
commit
b39c26ddc3
@ -1009,7 +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 *'.
|
||||
*/
|
||||
if (!(list_rows = fmemopen((char *)resp, strlen(resp) + 1, "r")))
|
||||
if (!(list_rows = fmemopen((char *)resp, strlen(resp), "r")))
|
||||
return_0;
|
||||
|
||||
/* begin region table */
|
||||
@ -1240,7 +1240,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 *'.
|
||||
*/
|
||||
stats_rows = fmemopen((char *)resp, strlen(resp) + 1, "r");
|
||||
stats_rows = fmemopen((char *)resp, strlen(resp), "r");
|
||||
if (!stats_rows)
|
||||
goto_bad;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user