From fc3e481634317f455e0c219de1f44b86d1dabeef Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Wed, 4 May 2022 13:21:01 +0200 Subject: smb: Remove redundant variable The `mount_try_again` variable is redundant since it is set to `TRUE` in all cases. Let's remove it to sligtly improve readability of the code. --- daemon/gvfsbackendsmb.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c index a1e3eacd..d999a2a6 100644 --- a/daemon/gvfsbackendsmb.c +++ b/daemon/gvfsbackendsmb.c @@ -78,7 +78,6 @@ struct _GVfsBackendSmb GMountSource *mount_source; /* Only used/set during mount */ int mount_try; - gboolean mount_try_again; gboolean mount_cancelled; gboolean password_in_keyring; @@ -202,16 +201,12 @@ auth_callback (SMBCCTX *context, backend->user == NULL && backend->domain == NULL) { - /* Try again if kerberos login fails */ - backend->mount_try_again = TRUE; g_debug ("auth_callback - kerberos pass\n"); } else if (backend->mount_try == 1 && backend->user == NULL && backend->domain == NULL) { - /* Try again if ccache login fails */ - backend->mount_try_again = TRUE; g_debug ("auth_callback - ccache pass\n"); } else @@ -293,9 +288,6 @@ auth_callback (SMBCCTX *context, } } - /* Try again if this fails */ - backend->mount_try_again = TRUE; - smbc_setOptionNoAutoAnonymousLogin (backend->smb_context, !anonymous); @@ -492,7 +484,6 @@ do_mount (GVfsBackend *backend, */ do { - op_backend->mount_try_again = FALSE; op_backend->mount_cancelled = FALSE; g_debug ("do_mount - try #%d \n", op_backend->mount_try); @@ -532,7 +523,7 @@ do_mount (GVfsBackend *backend, op_backend->mount_try ++; } - while (op_backend->mount_try_again); + while (TRUE); g_free (uri); -- cgit v1.2.1