aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-11-03 04:38:11 +0100
committerMattias Andrée <maandree@operamail.com>2013-11-03 04:38:11 +0100
commit2bfc8d23c897591e45ce82753772e8f0a258e798 (patch)
tree628e3f348107d8491db6325a534b07cb72338309
parentread passphrase (diff)
downloadlibpassphrase-2bfc8d23c897591e45ce82753772e8f0a258e798.tar.gz
libpassphrase-2bfc8d23c897591e45ce82753772e8f0a258e798.tar.bz2
libpassphrase-2bfc8d23c897591e45ce82753772e8f0a258e798.tar.xz
derp
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/cerberus.c2
-rw-r--r--src/passphrase.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/cerberus.c b/src/cerberus.c
index a9772c9..b27b3da 100644
--- a/src/cerberus.c
+++ b/src/cerberus.c
@@ -22,7 +22,7 @@
#include "passphrase.h"
-#define xfree(VAR) ({ if (var) free(var); })
+#define xfree(VAR) ({ if (VAR) free(VAR); })
/**
diff --git a/src/passphrase.c b/src/passphrase.c
index cd88c7f..4b6af86 100644
--- a/src/passphrase.c
+++ b/src/passphrase.c
@@ -72,6 +72,8 @@ char* get_passphrase(void)
*/
void disable_echo()
{
+ struct termios stty;
+
tcgetattr(STDIN_FILENO, &saved_stty);
stty = saved_stty;
stty.c_lflag &= ~ECHO;