From 43cd0bb654ae0225388678aa09798fc94be7a135 Mon Sep 17 00:00:00 2001 From: Simeon Simeonov Date: Fri, 9 Mar 2018 14:27:08 +0100 Subject: Fix some typos and tabify --- libsylph/masterpassword.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libsylph') diff --git a/libsylph/masterpassword.c b/libsylph/masterpassword.c index 4cef644..d240a7a 100644 --- a/libsylph/masterpassword.c +++ b/libsylph/masterpassword.c @@ -140,15 +140,12 @@ gint check_master_password_interactively(guint max_attempts) { guint cnt; - if (max_attempts < 1) - return 1; - - if (prefs_common.master_password_hash != NULL) { - return 1; - } + g_return_val_if_fail(max_attempts > 0, 1); + g_return_val_if_fail(prefs_common.master_password_hash != NULL, 1); if (master_password != NULL) { /* password already cached */ + debug_print("Master password already cached\n"); return check_password(master_password, prefs_common.master_password_hash); } -- cgit v1.3