summaryrefslogtreecommitdiff
path: root/mime.c
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2024-09-05 12:58:22 +0200
committerVincent Douillet <vincent@vdouillet.fr>2024-09-06 12:22:20 +0200
commit35a145fd161fb4d4f19aa9820b50438695b94414 (patch)
tree00e9f341d5b7e0a6874efbe9fafc0500cf13cd2d /mime.c
parent9b8d38ab209c6e7e747d6d420f1b105fe858c7eb (diff)
browse: add upload button
Diffstat (limited to 'mime.c')
-rw-r--r--mime.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mime.c b/mime.c
index 7136a99..57a0d2c 100644
--- a/mime.c
+++ b/mime.c
@@ -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];