Skip to content
Snippets Groups Projects
Commit 77532145 authored by David Vasek's avatar David Vasek Committed by Daniel Salzman
Browse files

backup: code robustness improvement

parent 64506a52
Branches
No related merge requests found
Pipeline #132584 passed with stages
in 13 minutes and 51 seconds
......@@ -170,7 +170,7 @@ static int get_backup_format(zone_backup_ctx_t *ctx)
{
PREPARE_PATH(label_path, label_file_name);
int ret = KNOT_EMALF;
int ret;
struct stat sb;
if (stat(label_path, &sb) != 0) {
......@@ -211,6 +211,7 @@ static int get_backup_format(zone_backup_ctx_t *ctx)
}
if (strcmp(line, label_file_head) != 0) {
ret = KNOT_EMALF;
goto done;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment