From cf9c6c30f1328f8804f55896b3fcfcd1f5ae0212 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 4 Jan 2013 16:54:46 +0100 Subject: [PATCH] constify mimetype list --- file.c | 2 +- mimetypes.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/file.c b/file.c index 5287748..372696c 100644 --- a/file.c +++ b/file.c @@ -252,7 +252,7 @@ uh_path_lookup(struct client *cl, const char *url) static const char * uh_file_mime_lookup(const char *path) { - struct mimetype *m = &uh_mime_types[0]; + const struct mimetype *m = &uh_mime_types[0]; const char *e; while (m->extn) { diff --git a/mimetypes.h b/mimetypes.h index 7fd885c..ad9286a 100644 --- a/mimetypes.h +++ b/mimetypes.h @@ -23,7 +23,7 @@ struct mimetype { const char *mime; }; -static struct mimetype uh_mime_types[] = { +static const struct mimetype uh_mime_types[] = { { "txt", "text/plain" }, { "log", "text/plain" }, -- 2.25.1