mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-26 22:35:55 +03:00
Removed goto from code.
This commit is contained in:
parent
cb0e06e7f8
commit
885eaad729
1 changed files with 7 additions and 5 deletions
|
@ -246,20 +246,22 @@ out:
|
|||
}
|
||||
|
||||
int csync_statedb_write(CSYNC *ctx) {
|
||||
bool recreate_db = false;
|
||||
/* drop tables */
|
||||
if (csync_statedb_drop_tables(ctx) < 0) {
|
||||
goto retry_create;
|
||||
recreate_db = true;
|
||||
}
|
||||
|
||||
/* create tables */
|
||||
if (csync_statedb_create_tables(ctx) < 0) {
|
||||
goto retry_create;
|
||||
if (! recreate_db) {
|
||||
if (csync_statedb_create_tables(ctx) < 0) {
|
||||
recreate_db = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (0) {
|
||||
if (recreate_db) {
|
||||
char *statedb_tmp;
|
||||
int rc;
|
||||
retry_create:
|
||||
if (asprintf(&statedb_tmp, "%s.ctmp", ctx->statedb.file) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue