src/util.h in mockspotify-0.1.6 vs src/util.h in mockspotify-0.1.7
- old
+ new
@@ -3,9 +3,11 @@
/*** Utility functions ***/
#define ALLOC(type) ALLOC_N(type, 1)
#define ALLOC_N(type, n) ((type*) xmalloc(sizeof(type) * (n)))
+#define MEMCPY(dst, src, type) MEMCPY_N(dst, src, type, 1)
+#define MEMCPY_N(dst, src, type, n) (memcpy((dst), (src), sizeof(type) * (n)))
void *xmalloc(size_t);
char *hextoa(const char *, int);
#define STARTS_WITH(x, y) (strncmp((x), (y), strlen(y)) == 0)