diff options
| author | amy <[email protected]> | 2025-11-21 06:45:40 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-21 06:45:40 -0800 |
| commit | 735c7feb19cb29ec24588bf1a4986b52f8cf6ffa (patch) | |
| tree | 3258d820c0ba2f4dfe8f823a7490df9fa6c187d2 | |
| parent | 01c3959cbb6dbe378c7ec6d5d079397fdc1296b7 (diff) | |
| parent | 8b007445198e9d25b6283ded647586d0e0486220 (diff) | |
Merge pull request #5 from basicallygit/main
Fix sum stuffs
| -rw-r--r-- | makefile | 5 | ||||
| -rw-r--r-- | src/net/util.c | 5 | ||||
| -rw-r--r-- | src/types/str.c | 2 |
3 files changed, 10 insertions, 2 deletions
@@ -28,11 +28,13 @@ else CFLAGS += -fPIC
endif
+.PHONY: all
all: $(TARGET)
release: CFLAGS += -O3
release: all
+.PHONY: install
install::
mkdir $(INSTALL)$(install_version) -p
cp $(TARGET) $(INSTALL)$(install_version)/$(TARGET)
@@ -68,5 +70,8 @@ reg: all $(TARGET): $(OBJS)
$(LINKER) $(OBJS) -o $(TARGET) $(LFLAGS)
+.PHONY: clean
clean:
rm -f $(OBJS)
+
+
diff --git a/src/net/util.c b/src/net/util.c index 344ea35..3b820c9 100644 --- a/src/net/util.c +++ b/src/net/util.c @@ -413,7 +413,10 @@ void parse_mimetypes(){ mime_type = map_init(); FILE* fp = fopen(_mimetypes, "r"); - if(fp == NULL) return (void)printf("unable to load mimetypes, set llby.net.mimetypes to a proper location, or nil to skip this\n"); + if(fp == NULL){ + fprintf(stderr, "unable to load mimetypes, set llby.net.mimetypes to a proper location, or nil to skip this\n"); + return; + } char* line = NULL; size_t len = 0; diff --git a/src/types/str.c b/src/types/str.c index e1818a2..bbd5ad9 100644 --- a/src/types/str.c +++ b/src/types/str.c @@ -35,7 +35,7 @@ str* str_init(const char* init){ void str_free(str* s){
free(s->c);
- return free(s);
+ free(s);
}
void str_push(str* s, const char* insert){
|
