aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/util.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-28 09:40:04 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-28 09:40:04 +0100
commit00135c8f9a8dda4fe3ccdfe8a05bea691e73930a (patch)
treeb611245d14425eb04a66afd5f503542dd62da164 /src/libutil/util.h
parent7fc1dd5af0baa24d94acc28bda4ef37528ba7414 (diff)
downloadrspamd-00135c8f9a8dda4fe3ccdfe8a05bea691e73930a.tar.gz
rspamd-00135c8f9a8dda4fe3ccdfe8a05bea691e73930a.zip
[Minor] Slight types improvement
Diffstat (limited to 'src/libutil/util.h')
-rw-r--r--src/libutil/util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/util.h b/src/libutil/util.h
index 21e4b320e..7f13ded06 100644
--- a/src/libutil/util.h
+++ b/src/libutil/util.h
@@ -411,7 +411,7 @@ void rspamd_random_seed_fast (void);
/**
* Constant time version of memcmp
*/
-gboolean rspamd_constant_memcmp (const guchar *a, const guchar *b, gsize len);
+gboolean rspamd_constant_memcmp (const void *a, const void *b, gsize len);
/**
* Open file without following symlinks or special stuff
@@ -472,7 +472,7 @@ void rspamd_gmtime (gint64 ts, struct tm *dest);
*/
void rspamd_localtime (gint64 ts, struct tm *dest);
-#define PTR_ARRAY_FOREACH(ar, i, cur) for ((i) = 0; (ar) != NULL && (i) < (ar)->len && (((cur) = g_ptr_array_index((ar), (i))) || 1); ++(i))
+#define PTR_ARRAY_FOREACH(ar, i, cur) for ((i) = 0; (ar) != NULL && (i) < (ar)->len && (((cur) = (__typeof__(cur))g_ptr_array_index((ar), (i))) || 1); ++(i))
/**
* Compresses the input string using gzip+zlib. Old string is replaced and freed