diff options
| -rw-r--r-- | bcrypt-test.c | 6 | ||||
| -rw-r--r-- | makefile | 2 |
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 | |||
| 63 | bool | 63 | bool |
| 64 | check_user(const char *const username, const char *const password) // NOLINT | 64 | check_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 | |||
| 105 | bool | 105 | bool |
| 106 | check_user_if_exists(const char *username) | 106 | check_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 | } |
| @@ -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 |
| 4 | LUA_BCRYPT_PATH=../lua-bcrypt/src | 4 | LUA_BCRYPT_PATH=../lua-bcrypt/src |
| 5 | 5 | ||
| 6 | CFLAGS =-Wall -Werror -Wno-pointer-sign -std=c17 -O2 -I$(LUA_BCRYPT_PATH) | 6 | CFLAGS=-Wall -Werror -Wno-pointer-sign -std=c17 -O2 -I$(LUA_BCRYPT_PATH) |
| 7 | 7 | ||
| 8 | bcrypt-test: bcrypt-test.o bcrypt-lib.a | 8 | bcrypt-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 |
