From b331963ba68c46c2370c7ab8a531f3a8d85c1c8d Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Fri, 9 May 2014 16:43:48 +0000 Subject: assert cleanup. --- src/htsencoding.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/htsencoding.c') diff --git a/src/htsencoding.c b/src/htsencoding.c index 6642d50..21d6cde 100644 --- a/src/htsencoding.c +++ b/src/htsencoding.c @@ -30,10 +30,9 @@ Please visit our Website: http://www.httrack.com /* Author: Xavier Roche */ /* ------------------------------------------------------------ */ -#include - #include "htscharset.h" #include "htsencoding.h" +#include "htssafe.h" /* static int decode_entity(const unsigned int hash, const size_t len); */ @@ -67,7 +66,7 @@ int hts_unescapeEntitiesWithCharset(const char *src, char *dest, const size_t ma int hex; unsigned int hash; - assert(max != 0); + assertf(max != 0); for(i = 0, j = 0, ampStart = (size_t) -1, ampStartDest = 0, uc = -1, hex = 0, hash = 0 ; src[i] != '\0' ; i++) { /* start of entity */ @@ -209,8 +208,8 @@ int hts_unescapeUrlSpecial(const char *src, char *dest, const size_t max, int seenQuery = 0; char utfBuffer[32]; - assert(src != dest); - assert(max != 0); + assertf(src != dest); + assertf(max != 0); for(i = 0, j = 0, k = 0, utfBufferJ = 0, utfBufferSize = 0, lastI = (size_t) -1, lastJ = (size_t) -1 -- cgit v1.2.3