Fossil SCM

Avoid duplicate technote_render_to_html calls in RSS helper.

vor0nwe 2026-03-08 11:40 rss-content
Commit 2b9f8fbb7aab99a0773504fa6699b7efd87467effe0021ff128c26ab35b681de
1 file changed +3 -2
+3 -2
--- src/rss.c
+++ src/rss.c
@@ -235,12 +235,13 @@
235235
pPost = manifest_get(rid, CFTYPE_FORUM, 0);
236236
if( pPost ){
237237
forum_render_to_html(pOut, pPost->zMimetype, pPost->zWiki);
238238
}
239239
}else if( zEType[0]=='e' ){
240
- if( pzAltLink ) *pzAltLink = technote_render_to_html(pOut, rid);
241
- else free(technote_render_to_html(pOut, rid));
240
+ char *zAltLink = technote_render_to_html(pOut, rid);
241
+ if( pzAltLink ) *pzAltLink = zAltLink;
242
+ else free(zAltLink);
242243
}
243244
if( pPost ) manifest_destroy(pPost);
244245
if( blob_size(pOut)>0 ){
245246
rss_make_abs_links(&normalized, zBase, zTop, blob_str(pOut), blob_size(pOut));
246247
blob_reset(pOut);
247248
--- src/rss.c
+++ src/rss.c
@@ -235,12 +235,13 @@
235 pPost = manifest_get(rid, CFTYPE_FORUM, 0);
236 if( pPost ){
237 forum_render_to_html(pOut, pPost->zMimetype, pPost->zWiki);
238 }
239 }else if( zEType[0]=='e' ){
240 if( pzAltLink ) *pzAltLink = technote_render_to_html(pOut, rid);
241 else free(technote_render_to_html(pOut, rid));
 
242 }
243 if( pPost ) manifest_destroy(pPost);
244 if( blob_size(pOut)>0 ){
245 rss_make_abs_links(&normalized, zBase, zTop, blob_str(pOut), blob_size(pOut));
246 blob_reset(pOut);
247
--- src/rss.c
+++ src/rss.c
@@ -235,12 +235,13 @@
235 pPost = manifest_get(rid, CFTYPE_FORUM, 0);
236 if( pPost ){
237 forum_render_to_html(pOut, pPost->zMimetype, pPost->zWiki);
238 }
239 }else if( zEType[0]=='e' ){
240 char *zAltLink = technote_render_to_html(pOut, rid);
241 if( pzAltLink ) *pzAltLink = zAltLink;
242 else free(zAltLink);
243 }
244 if( pPost ) manifest_destroy(pPost);
245 if( blob_size(pOut)>0 ){
246 rss_make_abs_links(&normalized, zBase, zTop, blob_str(pOut), blob_size(pOut));
247 blob_reset(pOut);
248

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button