diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2024-09-05 12:58:22 +0200 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2024-09-06 12:22:20 +0200 |
commit | 35a145fd161fb4d4f19aa9820b50438695b94414 (patch) | |
tree | 00e9f341d5b7e0a6874efbe9fafc0500cf13cd2d /mime.c | |
parent | 9b8d38ab209c6e7e747d6d420f1b105fe858c7eb (diff) |
browse: add upload button
Diffstat (limited to 'mime.c')
-rw-r--r-- | mime.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -34,7 +34,7 @@ #include "mime.h" struct mime_map { - char* str; + char *str; enum mime mime; }; @@ -119,11 +119,11 @@ char* mime_desc_list[MIME__MAX] = { }; enum mime -mime_from_ext(char * ext) +mime_from_ext(const char *ext) { struct mime_map *mime; - for(mime = mime_ext_list; mime->str != NULL; mime++) { + for (mime = mime_ext_list; mime->str != NULL; mime++) { if (strcasecmp(ext, mime->str) == 0) { return mime->mime; } @@ -132,7 +132,7 @@ mime_from_ext(char * ext) } -char * +const char * mime_str(enum mime mime) { return mime_desc_list[mime]; |