diff --git a/c302.c b/c302.c index c7bb28d..01da61c 100644 --- a/c302.c +++ b/c302.c @@ -6,7 +6,7 @@ #include #include "c302.h" -static void http_error(ERRCODE code, char* msg) { +static void http_error(errcode_enum_t code, char* msg) { uint32_t len = strlen(msg) + typel[code]; char* str = malloc(len); sprintf(str, types[code], msg); diff --git a/c302.h b/c302.h index 1a0f761..cfff927 100644 --- a/c302.h +++ b/c302.h @@ -14,8 +14,8 @@ #define H500 "HTTP/1.0 500 Internal Server Error\r\nContent-Type: text/html\r\n\r\n

%s\r\n" const char* types[] = {H400, H404, H500}; const uint8_t typel[] = {59, 111, 69}; -enum ERRCODE {HTTP400, HTTP404, HTTP500}; -typedef enum ERRCODE ERRCODE; +enum errcode_enum_t {HTTP400, HTTP404, HTTP500}; +typedef enum errcode_enum_t errcode_enum_t; static const char* urls[] = { "https://bocchi.rocks/assets/img/page/character/hitori/main.png", // 後藤ひとり