src/nhttpd: clean code

Origin commit data
------------------
Branch: ni/coolstream
Commit: 5e4a541781
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-11-28 (Wed, 28 Nov 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2012-11-28 19:03:03 +01:00
parent b7482b6bb6
commit c65016492b
28 changed files with 106 additions and 113 deletions

View File

@@ -12,7 +12,7 @@
#include <iomanip>
// yhttpd
#include "yconfig.h"
#include <yconfig.h>
#include "ytypes_globals.h"
#include "helper.h"
#include "ylogging.h"
@@ -220,10 +220,10 @@ std::string encodeString(std::string decodedString) {
unsigned int len = sizeof(char) * decodedString.length() * 5 + 1;
std::string result(len, '\0');
char *newString = (char *) result.c_str();
char *dstring = (char *) decodedString.c_str();
char one_char;
if (len == result.length()) // got memory needed
{
char *dstring = (char *) decodedString.c_str();
while ((one_char = *dstring++)) /* use the null character as a loop terminator */
{
if (isalnum(one_char))