Coverage Report

Created: 2026-03-27 06:40

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/mpv/ta/ta_talloc.c
Line
Count
Source
1
/* Copyright (C) 2017 the mpv developers
2
 *
3
 * Permission to use, copy, modify, and/or distribute this software for any
4
 * purpose with or without fee is hereby granted, provided that the above
5
 * copyright notice and this permission notice appear in all copies.
6
 *
7
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14
 */
15
16
#include <stdlib.h>
17
#include <string.h>
18
#include <stdio.h>
19
#include <assert.h>
20
21
#include "ta_talloc.h"
22
23
char *ta_talloc_strdup_append(char *s, const char *a)
24
16.5k
{
25
16.5k
    ta_xstrdup_append(&s, a);
26
16.5k
    return s;
27
16.5k
}
28
29
char *ta_talloc_strdup_append_buffer(char *s, const char *a)
30
4.85M
{
31
4.85M
    ta_xstrdup_append_buffer(&s, a);
32
4.85M
    return s;
33
4.85M
}
34
35
char *ta_talloc_strndup_append(char *s, const char *a, size_t n)
36
0
{
37
0
    ta_xstrndup_append(&s, a, n);
38
0
    return s;
39
0
}
40
41
char *ta_talloc_strndup_append_buffer(char *s, const char *a, size_t n)
42
4.82M
{
43
4.82M
    ta_xstrndup_append_buffer(&s, a, n);
44
4.82M
    return s;
45
4.82M
}
46
47
char *ta_talloc_vasprintf_append(char *s, const char *fmt, va_list ap)
48
7.79k
{
49
7.79k
    ta_xvasprintf_append(&s, fmt, ap);
50
7.79k
    return s;
51
7.79k
}
52
53
char *ta_talloc_vasprintf_append_buffer(char *s, const char *fmt, va_list ap)
54
84.9k
{
55
84.9k
    ta_xvasprintf_append_buffer(&s, fmt, ap);
56
84.9k
    return s;
57
84.9k
}
58
59
char *ta_talloc_asprintf_append(char *s, const char *fmt, ...)
60
7.79k
{
61
7.79k
    char *res;
62
7.79k
    va_list ap;
63
7.79k
    va_start(ap, fmt);
64
7.79k
    res = talloc_vasprintf_append(s, fmt, ap);
65
7.79k
    va_end(ap);
66
7.79k
    return res;
67
7.79k
}
68
69
char *ta_talloc_asprintf_append_buffer(char *s, const char *fmt, ...)
70
84.9k
{
71
84.9k
    char *res;
72
84.9k
    va_list ap;
73
84.9k
    va_start(ap, fmt);
74
84.9k
    res = talloc_vasprintf_append_buffer(s, fmt, ap);
75
    va_end(ap);
76
84.9k
    return res;
77
84.9k
}