commit 79ff3ecbc87072a8eaa3cf6a3f94101df500ecdf
parent 82f29c375fb1f48d5645e3cac2daa174948f1fdc
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 18 Jan 2020 19:22:42 +0100
sfeed_opml_import: use code-style pattern similar to other programs
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git 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);