From 79ff3ecbc87072a8eaa3cf6a3f94101df500ecdf Mon Sep 17 00:00:00 2001
From: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 18 Jan 2020 19:22:42 +0100
Subject: sfeed_opml_import: use code-style pattern similar to other programs

---
 sfeed_opml_import.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/sfeed_opml_import.c b/sfeed_opml_import.c
index df74cc9..0802542 100644
--- a/sfeed_opml_import.c
+++ b/sfeed_opml_import.c
@@ -77,11 +77,9 @@ xmlattrentity(XMLParser *p, const char *t, size_t tl, const char *n, size_t nl,
 	const char *v, size_t vl)
 {
 	char buf[16];
-	ssize_t len;
+	int len;
 
-	if ((len = xml_entitytostr(v, buf, sizeof(buf))) < 0)
-		return;
-	if (len > 0)
+	if ((len = xml_entitytostr(v, buf, sizeof(buf))) > 0)
 		xmlattr(p, t, tl, n, nl, buf, len);
 	else
 		xmlattr(p, t, tl, n, nl, v, vl);
-- 
cgit v1.2.3