summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bcrypt-test.c6
-rw-r--r--makefile2
2 files changed, 4 insertions, 4 deletions
diff --git a/bcrypt-test.c b/bcrypt-test.c
index 3bebda3..57cf390 100644
--- a/bcrypt-test.c
+++ b/bcrypt-test.c
@@ -35,7 +35,7 @@ create_user(const char *username, const char *password) // NOLINT
35 } 35 }
36 } 36 }
37 37
38 FILE *database = fopen(USER_DATABASE, "at"); 38 FILE *database = fopen(USER_DATABASE, "a");
39 if ( database == NULL ) { 39 if ( database == NULL ) {
40 return false; 40 return false;
41 } 41 }
@@ -63,7 +63,7 @@ create_user(const char *username, const char *password) // NOLINT
63bool 63bool
64check_user(const char *const username, const char *const password) // NOLINT 64check_user(const char *const username, const char *const password) // NOLINT
65{ 65{
66 FILE *database = fopen(USER_DATABASE, "rt"); 66 FILE *database = fopen(USER_DATABASE, "r");
67 if ( database == NULL ) { 67 if ( database == NULL ) {
68 return false; 68 return false;
69 } 69 }
@@ -105,7 +105,7 @@ check_user(const char *const username, const char *const password) // NOLINT
105bool 105bool
106check_user_if_exists(const char *username) 106check_user_if_exists(const char *username)
107{ 107{
108 FILE *database = fopen(USER_DATABASE, "rt"); 108 FILE *database = fopen(USER_DATABASE, "r");
109 if ( database == NULL ) { 109 if ( database == NULL ) {
110 return false; 110 return false;
111 } 111 }
diff --git a/makefile b/makefile
index e0a8644..d842299 100644
--- a/makefile
+++ b/makefile
@@ -3,7 +3,7 @@ all: bcrypt-test
3# git clone https://github.com/mikejsavage/lua-bcrypt.git 3# git clone https://github.com/mikejsavage/lua-bcrypt.git
4LUA_BCRYPT_PATH=../lua-bcrypt/src 4LUA_BCRYPT_PATH=../lua-bcrypt/src
5 5
6CFLAGS =-Wall -Werror -Wno-pointer-sign -std=c17 -O2 -I$(LUA_BCRYPT_PATH) 6CFLAGS=-Wall -Werror -Wno-pointer-sign -std=c17 -O2 -I$(LUA_BCRYPT_PATH)
7 7
8bcrypt-test: bcrypt-test.o bcrypt-lib.a 8bcrypt-test: bcrypt-test.o bcrypt-lib.a
9 cc -o $@ bcrypt-test.o bcrypt-lib.a 9 cc -o $@ bcrypt-test.o bcrypt-lib.a