Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/majn/tgl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHedayat Vatankhah <hedayat.fwd@gmail.com>2015-07-09 01:07:38 +0300
committerHedayat Vatankhah <hedayat.fwd@gmail.com>2015-07-10 02:02:59 +0300
commit57c7d894102133e0a34cb6cb46795f38c99e8205 (patch)
tree1c71602daeafef84a2491641760fe2c5fe9e9698 /tools.h
parent544c110eaf9c5a5e98e467694ba1c74303c54c52 (diff)
add an explicit cast to fix a C++ compile error
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools.h b/tools.h
index fbe618b..accc697 100644
--- a/tools.h
+++ b/tools.h
@@ -1,4 +1,4 @@
-/*
+/*
This file is part of tgl-library
This library is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@
#define talloc tgl_allocator->alloc
#define talloc0 tgl_alloc0
-#define tfree tgl_allocator->free
+#define tfree tgl_allocator->free
#define tfree_str tgl_free_str
#define tfree_secure tgl_free_secure
#define trealloc tgl_allocator->realloc
@@ -96,7 +96,7 @@ void tgl_my_clock_gettime (int clock_id, struct timespec *T);
static inline void tgl_free_str (void *ptr) {
if (!ptr) { return; }
- tfree (ptr, strlen (ptr) + 1);
+ tfree (ptr, strlen ((const char *)ptr) + 1);
}
static inline void tgl_free_secure (void *ptr, int size) {
@@ -110,7 +110,7 @@ static inline void hexdump (void *ptr, void *end_ptr) {
fprintf (stderr, "%02x", (int)*(unsigned char *)ptr);
ptr ++;
total ++;
- if (total == 16) {
+ if (total == 16) {
fprintf (stderr, "\n");
total = 0;
}