refactor: remove non used errors
This commit is contained in:
16
src/utils/error.c
Normal file
16
src/utils/error.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user