summaryrefslogtreecommitdiff
path: root/src/htsencoding.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2014-05-09 16:43:48 +0000
committerXavier Roche <xroche@users.noreply.github.com>2014-05-09 16:43:48 +0000
commitb331963ba68c46c2370c7ab8a531f3a8d85c1c8d (patch)
tree2ffd01f0ac8763d67f31db6b239defa39495d07d /src/htsencoding.c
parentf48114006deced315348925ba36af3cb6a022324 (diff)
assert cleanup.
Diffstat (limited to 'src/htsencoding.c')
-rw-r--r--src/htsencoding.c9
1 files changed, 4 insertions, 5 deletions
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 <assert.h>
-
#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