diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2020-01-18 19:22:42 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2020-01-18 20:09:47 +0100 |
commit | 79ff3ecbc87072a8eaa3cf6a3f94101df500ecdf (patch) | |
tree | d1be0ab556f9b4c44fc20fc830b6f067cfe5bd6f | |
parent | 82f29c375fb1f48d5645e3cac2daa174948f1fdc (diff) |
sfeed_opml_import: use code-style pattern similar to other programs
-rw-r--r-- | sfeed_opml_import.c | 6 |
1 files 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); |