[PATCH] test-xml-encode: fix sparse NULL pointer warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxxx>
---

Hi Johannes,

If you need to re-roll your 'js/vsts-ci' branch, could you please
squash this into the relevant patch (commit af7747e7c7 ("tests: optionally
write results as JUnit-style .xml", 2019-01-23)).

Thanks!

ATB,
Ramsay Jones

 t/helper/test-xml-encode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/helper/test-xml-encode.c b/t/helper/test-xml-encode.c
index 367c4875e6..a648bbd961 100644
--- a/t/helper/test-xml-encode.c
+++ b/t/helper/test-xml-encode.c
@@ -26,7 +26,7 @@ int cmd__xml_encode(int argc, const char **argv)
 		if (tmp2) {
 			if ((ch & 0xc0) != 0x80) {
 				fputs(utf8_replace_character, stdout);
-				tmp2 = 0;
+				tmp2 = NULL;
 				cur--;
 				continue;
 			}
@@ -34,7 +34,7 @@ int cmd__xml_encode(int argc, const char **argv)
 			tmp2++;
 			if (--remaining == 0) {
 				fwrite(tmp, tmp2 - tmp, 1, stdout);
-				tmp2 = 0;
+				tmp2 = NULL;
 			}
 			continue;
 		}
-- 
2.20.0



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux