summaryrefslogtreecommitdiff
path: root/plugins/HTTPServer/src/MimeHandling.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-08 22:10:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-08 22:10:14 +0000
commitbb952e431866d131bae95c08e579ec8a00f00343 (patch)
tree60881668cf328b50906346c5f66ce47da2d9ad88 /plugins/HTTPServer/src/MimeHandling.cpp
parentc181af64bab27eb50e684c64c0a3caa49f8bbe39 (diff)
core protocol helpers for creating protocol evengs, services & threads
git-svn-id: http://svn.miranda-ng.org/main/trunk@5286 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HTTPServer/src/MimeHandling.cpp')
-rw-r--r--plugins/HTTPServer/src/MimeHandling.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/HTTPServer/src/MimeHandling.cpp b/plugins/HTTPServer/src/MimeHandling.cpp
index 42964bfeb3..9656753056 100644
--- a/plugins/HTTPServer/src/MimeHandling.cpp
+++ b/plugins/HTTPServer/src/MimeHandling.cpp
@@ -9,7 +9,6 @@ int bInitMimeHandling() {
FILE *mimeDB;
char line[LINE_MAX_SIZE];
char *tok = NULL;
- int lenght;
ContentType *pDBCell = NULL;
ContentTypeDB pDB = NULL;
ExtensionList extListCur = NULL;
@@ -32,10 +31,10 @@ int bInitMimeHandling() {
*tok = '\0';
}
/* remove trailing \n */
- lenght = strlen(line);
- if (lenght > 0 && line[lenght - 1] == '\n') {
+ int lenght = (int)strlen(line);
+ if (lenght > 0 && line[lenght - 1] == '\n')
line[lenght - 1] = '\0';
- }
+
/* first token = mime type */
tok = (char*)strtok(line, " \t");
/*create and fill a cell*/