summaryrefslogtreecommitdiff
path: root/lib/string.h
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2020-05-01 15:34:17 +0200
committerMaria Matejka <mq@ucw.cz>2020-05-01 15:34:17 +0200
commit048eb2ddf1ee9587d9fa30cbb3f87d6f650a2133 (patch)
treefdec4c5679a02c901cf2bc92fd81618c6f12d48e /lib/string.h
parent17de3a023f7bde293892b41bfafe5740c8553fc8 (diff)
parent59238768b3b05fa134348d2232b42537d0403994 (diff)
Merge remote-tracking branch 'origin/mq-static-analysis'
Diffstat (limited to 'lib/string.h')
-rw-r--r--lib/string.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/string.h b/lib/string.h
index d6ae5ef7..0f650178 100644
--- a/lib/string.h
+++ b/lib/string.h
@@ -72,6 +72,15 @@ bstrcmp(const char *s1, const char *s2)
return !s2 - !s1;
}
+static inline void *
+bmemcpy(void *dest, const void *src, size_t n)
+{
+ if (n)
+ return memcpy(dest, src, n);
+ else
+ return dest;
+}
+
#define ROUTER_ID_64_LENGTH 23
#endif