res->title = res->link = res->description = NULL;
for (; data; data = data->next) {
+ xmlNodePtr child;
const char *name;
if (data->type != XML_ELEMENT_NODE) {
continue;
}
- xmlNodePtr child = data->children;
+ child = data->children;
if (!child) {
continue;
}
static inline void read_element(PRSS *res, xmlNodePtr n)
{
+ xmlNodePtr child;
const char *name;
if (n->type != XML_ELEMENT_NODE) {
return;
}
- xmlNodePtr child = n->children;
+ child = n->children;
if (!child) {
return;
static inline int parse_rss_2_0(PRSS *res, xmlNodePtr root)
{
xmlNodePtr channel = root->children;
+ xmlNodePtr n;
+ int items = 0;
while (channel && (channel->type != XML_ELEMENT_NODE
|| strcmp((const char *) channel->name, "channel"))) {
return 0;
}
- int items = 0;
- xmlNodePtr n;
-
for (n = channel->children; n; n = n->next) {
if (n->type == XML_ELEMENT_NODE &&
!strcmp((const char *) n->name, "item")) {