summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-xml-output.c
diff options
context:
space:
mode:
authorSunny Kumar <sunkumar@redhat.com>2018-08-10 00:57:09 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2018-08-24 14:59:40 +0000
commit5acb74d7daee0fc5c501a82e604ec2abdb3cf88a (patch)
treeb1ac15b882945f8b7e7815127da0d648de694871 /cli/src/cli-xml-output.c
parent3cb5b63a0a78048f8d09e59ab5d79bc2f659ed17 (diff)
cli : fix few coverity in cli
This patch fixes DEADCODE and FORWARD_NULL. CID : 1124495, 1124380, 1124381 Change-Id: I79992e396dbcb1bfe6cd0614d49a8da3f67d648d updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'cli/src/cli-xml-output.c')
-rw-r--r--cli/src/cli-xml-output.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index 4f912f81043..78aa8439e9d 100644
--- a/cli/src/cli-xml-output.c
+++ b/cli/src/cli-xml-output.c
@@ -2411,10 +2411,10 @@ cli_xml_output_vol_info_option (xmlTextWriterPtr writer, char *substr,
break;
ptr1++;
ptr2++;
- if (!ptr1)
- goto out;
- if (!ptr2)
- goto out;
+ if (!*ptr1)
+ break;
+ if (!*ptr2)
+ break;
}
if (*ptr2 == '\0')
goto out;