refactor: remove non used errors

This commit is contained in:
2025-10-26 18:14:54 +01:00
parent 1863c58b4f
commit 80977bcb7e
7 changed files with 35 additions and 16 deletions

16
src/utils/error.c Normal file
View File

@@ -0,0 +1,16 @@
#include "utils/error.h"
#include <stddef.h>
/* @TODO: complete this array */
static cws_error_s errors[] = {{CWS_SERVER_OK, "No error found"}};
char *cws_error_str(cws_server_ret code) {
for (unsigned long i = 0; i < ARR_SIZE(errors); ++i) {
if (errors[i].code == code) {
return errors[i].str;
}
}
return NULL;
}