summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/rest.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/rest.c b/src/rest.c
index 0b252e2..a6dafbc 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -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;