Clean up error definitions, location and expose them in the headers

- Exposes all errors in the header file so any user of the api can test
   for the specific error conditions
 - Mark all static error pointers as const
 - Move generic errors into error.h
 - Name all errors err_modulename_* for errors that belong to a specific
   module and err_* for generic errors.
This commit is contained in:
2025-04-04 12:23:35 +02:00
parent cb8768b1d0
commit af66790cff
8 changed files with 24 additions and 17 deletions

View File

@ -19,6 +19,8 @@ static inline void error_free(error_t *err) {
}
/* Some global errors */
extern error_t *err_allocation_failed;
extern error_t *const err_allocation_failed;
extern error_t *const err_eof;
extern error_t *const err_unknown_read_failure;
#endif // INCLUDE_SRC_ERROR_H_