diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/rest.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -2771,9 +2771,8 @@ static int og_cmd_delete_image(json_t *element, struct og_msg_params *params) const char *key, *image; struct og_dbi *dbi; dbi_result result; - int rval, err = 0; json_t *value; - + int err = 0; if (json_typeof(element) != JSON_OBJECT) return -1; @@ -2835,13 +2834,7 @@ static int og_cmd_delete_image(json_t *element, struct og_msg_params *params) } dbi_result_free(result); - rval = unlink(filename); - if (rval) { - og_dbi_close(dbi); - syslog(LOG_ERR, "cannot delete image %s: %s\n", - image, strerror(errno)); - return -1; - } + unlink(filename); og_dbi_close(dbi); return 0; |