aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--src/auth.c1
-rw-r--r--src/netcosm.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 0539e7d..e80da2f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,10 @@
-CC = clang
+CC = gcc
OUT = build
PLATFORM = unix
NETCOSM_OBJ = src/server.o src/client.o src/auth.o src/telnet.o
-CFLAGS = -O0 -g -I src/ -I target/$(PLATFORM) -Wall -Wextra
+CFLAGS = -O3 -g -I src/ -I target/$(PLATFORM) -Wall -Wextra
LDFLAGS = -lgcrypt
all: $(OUT)/$(PLATFORM).bin
diff --git a/src/auth.c b/src/auth.c
index e89c0d0..b54d0a4 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -250,6 +250,7 @@ struct authinfo_t auth_check(const char *name2, const char *pass2)
struct authinfo_t ret;
ret.success = false;
ret.authlevel = PRIV_NONE;
+ ret.user = NULL;
while(1)
{
diff --git a/src/netcosm.h b/src/netcosm.h
index c8566da..be6d1a2 100644
--- a/src/netcosm.h
+++ b/src/netcosm.h
@@ -31,7 +31,7 @@
struct authinfo_t {
bool success;
const char *user;
- int authlevel; /* 0 = highest */
+ int authlevel;
};
void client_main(int fd, struct sockaddr_in *addr, int);