From 6fb95bc6cb3a69cc5319b1bb637c866c428552ec Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Wed, 8 Feb 2012 23:33:31 +0100 Subject: [PATCH] Remove while loop --- document.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/document.c b/document.c index 6c391ae..ee638b8 100644 --- a/document.c +++ b/document.c @@ -271,7 +271,7 @@ zathura_document_open(zathura_t* zathura, const char* path, const char* password zathura_plugin_error_t error = plugin->open_function(document); if (error != ZATHURA_PLUGIN_ERROR_OK) { - while (error == ZATHURA_PLUGIN_ERROR_INVALID_PASSWORD) { + if (error == ZATHURA_PLUGIN_ERROR_INVALID_PASSWORD) { zathura_password_dialog_info_t* password_dialog_info = malloc(sizeof(zathura_password_dialog_info_t)); if (password_dialog_info != NULL) { password_dialog_info->path = g_strdup(path);