Mercurial > blahgd
changeset 972:cd1e18ebc0b4
post: remove unnecessary local variable
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Tue, 13 Nov 2018 16:24:39 -0500 |
parents | 4e27fc16450d |
children | 9992fb1b5e6f |
files | post.c |
diffstat | 1 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/post.c Tue Nov 13 15:59:01 2018 -0500 +++ b/post.c Tue Nov 13 16:24:39 2018 -0500 @@ -138,20 +138,15 @@ static struct str *load_comment(struct post *post, int commid) { char path[FILENAME_MAX]; - struct str *err_msg; struct str *out; - err_msg = STATIC_STR("Error: could not load comment text."); - snprintf(path, FILENAME_MAX, "%s/posts/%d/comments/%d/text.txt", str_cstr(config.data_dir), post->id, commid); out = file_cache_get_cb(path, post->preview ? NULL : revalidate_post, post); if (IS_ERR(out)) - out = err_msg; - else - str_putref(err_msg); + out = STATIC_STR("Error: could not load comment text."); return out; }