aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libspl
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-06-06 15:54:04 -0400
committerGitHub <[email protected]>2020-06-06 12:54:04 -0700
commit60265072e02049be708f74cf0865eba2434a2d85 (patch)
tree6cd0cabba28e51cfe2b25712d1b6a2fac8fb7857 /lib/libspl
parentc1f3de18a4347c3aceee114e6681c2055e8863f8 (diff)
Improve compatibility with C++ consumers
C++ is a little picky about not using keywords for names, or string constness. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Jorgen Lundman <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10409
Diffstat (limited to 'lib/libspl')
-rw-r--r--lib/libspl/include/assert.h3
-rw-r--r--lib/libspl/include/umem.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/libspl/include/assert.h b/lib/libspl/include/assert.h
index 1b8f6befb..6f80f1334 100644
--- a/lib/libspl/include/assert.h
+++ b/lib/libspl/include/assert.h
@@ -50,7 +50,8 @@ libspl_assert(const char *buf, const char *file, const char *func, int line)
/* printf version of libspl_assert */
static inline void
-libspl_assertf(const char *file, const char *func, int line, char *format, ...)
+libspl_assertf(const char *file, const char *func, int line,
+ const char *format, ...)
{
va_list args;
diff --git a/lib/libspl/include/umem.h b/lib/libspl/include/umem.h
index 59dc93144..a92dce9b2 100644
--- a/lib/libspl/include/umem.h
+++ b/lib/libspl/include/umem.h
@@ -145,7 +145,7 @@ umem_cache_create(
{
umem_cache_t *cp;
- cp = umem_alloc(sizeof (umem_cache_t), UMEM_DEFAULT);
+ cp = (umem_cache_t *)umem_alloc(sizeof (umem_cache_t), UMEM_DEFAULT);
if (cp) {
strlcpy(cp->cache_name, name, UMEM_CACHE_NAMELEN);
cp->cache_bufsize = bufsize;