From cf2c7d48380969200034afeab93169e68c34c397 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 23 Dec 2020 17:39:01 -0800 Subject: [clang-tidy] Do not use else after return Signed-off-by: Rosen Penev --- tools/idevicebackup.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tools/idevicebackup.c') diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c index 0affd7a..2856fda 100644 --- a/tools/idevicebackup.c +++ b/tools/idevicebackup.c @@ -926,15 +926,16 @@ int main(int argc, char *argv[]) if (aerr == AFC_E_SUCCESS) { do_post_notification(NP_SYNC_DID_START); break; - } else if (aerr == AFC_E_OP_WOULD_BLOCK) { + } + if (aerr == AFC_E_OP_WOULD_BLOCK) { usleep(LOCK_WAIT); continue; - } else { - fprintf(stderr, "ERROR: could not lock file! error code: %d\n", aerr); - afc_file_close(afc, lockfile); - lockfile = 0; - cmd = CMD_LEAVE; } + + fprintf(stderr, "ERROR: could not lock file! error code: %d\n", aerr); + afc_file_close(afc, lockfile); + lockfile = 0; + cmd = CMD_LEAVE; } if (i == LOCK_ATTEMPTS) { fprintf(stderr, "ERROR: timeout while locking for sync\n"); -- cgit v1.1-32-gdbae