From bb952e431866d131bae95c08e579ec8a00f00343 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 8 Jul 2013 22:10:14 +0000 Subject: 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 --- plugins/HTTPServer/src/MimeHandling.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins/HTTPServer/src/MimeHandling.cpp') 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*/ -- cgit v1.2.3