Commit | Line | Data |
---|---|---|
6dc2ca62 MD |
1 | /* |
2 | * Common Trace Format | |
3 | * | |
4 | * Strings read/write functions. | |
5 | * | |
6 | * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
7 | * | |
8 | * Dual LGPL v2.1/GPL v2 license. | |
9 | */ | |
10 | ||
11 | #include <ctf/ctf-types.h> | |
12 | #include <string.h> | |
13 | ||
14 | size_t string_copy(char *dest, const char *src) | |
15 | { | |
16 | size_t len = strlen(src) + 1; | |
17 | ||
18 | if (!dest) | |
19 | goto end; | |
20 | strcpy(dest, src); | |
21 | end: | |
22 | return len * 8; | |
23 | } |