*/
#include <config.h>
-#include "dynamic-string.h"
+#include "openvswitch/dynamic-string.h"
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
return false;
}
}
+
+void
+ds_clone(struct ds *dst, struct ds *source)
+{
+ dst->length = source->length;
+ dst->allocated = dst->length;
+ dst->string = xmalloc(dst->allocated + 1);
+ memcpy(dst->string, source->string, dst->allocated + 1);
+}