chiark / gitweb /
journalctl: rework short output mode to rebuild full syslog message
[elogind.git] / src / util.c
index d3d521b9280833518d793e293dbb24f14757fc16..2b735e8413bfeb7649c731a866de7c8bbfb8147c 100644 (file)
@@ -6050,3 +6050,16 @@ finish:
         return buf;
 
 }
+
+void* memdup(const void *p, size_t l) {
+        void *r;
+
+        assert(p);
+
+        r = malloc(l);
+        if (!r)
+                return NULL;
+
+        memcpy(r, p, l);
+        return r;
+}