/work/include/glib-2.0/glib/gstrfuncs.h
Line | Count | Source |
1 | | /* GLIB - Library of useful routines for C programming |
2 | | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
3 | | * |
4 | | * SPDX-License-Identifier: LGPL-2.1-or-later |
5 | | * |
6 | | * This library is free software; you can redistribute it and/or |
7 | | * modify it under the terms of the GNU Lesser General Public |
8 | | * License as published by the Free Software Foundation; either |
9 | | * version 2.1 of the License, or (at your option) any later version. |
10 | | * |
11 | | * This library is distributed in the hope that it will be useful, |
12 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 | | * Lesser General Public License for more details. |
15 | | * |
16 | | * You should have received a copy of the GNU Lesser General Public |
17 | | * License along with this library; if not, see <http://www.gnu.org/licenses/>. |
18 | | */ |
19 | | |
20 | | /* |
21 | | * Modified by the GLib Team and others 1997-2000. See the AUTHORS |
22 | | * file for a list of people on the GLib Team. See the ChangeLog |
23 | | * files for a list of changes. These files are distributed with |
24 | | * GLib at ftp://ftp.gtk.org/pub/gtk/. |
25 | | */ |
26 | | |
27 | | #ifndef __G_STRFUNCS_H__ |
28 | | #define __G_STRFUNCS_H__ |
29 | | |
30 | | #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION) |
31 | | #error "Only <glib.h> can be included directly." |
32 | | #endif |
33 | | |
34 | | #include <stdarg.h> |
35 | | #include <string.h> |
36 | | |
37 | | #include <glib/gmacros.h> |
38 | | #include <glib/gtypes.h> |
39 | | #include <glib/gerror.h> |
40 | | #include <glib/gmem.h> |
41 | | |
42 | | G_BEGIN_DECLS |
43 | | |
44 | | /* Functions like the ones in <ctype.h> that are not affected by locale. */ |
45 | | typedef enum { |
46 | | G_ASCII_ALNUM = 1 << 0, |
47 | | G_ASCII_ALPHA = 1 << 1, |
48 | | G_ASCII_CNTRL = 1 << 2, |
49 | | G_ASCII_DIGIT = 1 << 3, |
50 | | G_ASCII_GRAPH = 1 << 4, |
51 | | G_ASCII_LOWER = 1 << 5, |
52 | | G_ASCII_PRINT = 1 << 6, |
53 | | G_ASCII_PUNCT = 1 << 7, |
54 | | G_ASCII_SPACE = 1 << 8, |
55 | | G_ASCII_UPPER = 1 << 9, |
56 | | G_ASCII_XDIGIT = 1 << 10 |
57 | | } GAsciiType; |
58 | | |
59 | | GLIB_VAR const guint16 * const g_ascii_table; |
60 | | |
61 | | #define g_ascii_isalnum(c) \ |
62 | 0 | ((g_ascii_table[(guchar) (c)] & G_ASCII_ALNUM) != 0) |
63 | | |
64 | | #define g_ascii_isalpha(c) \ |
65 | 0 | ((g_ascii_table[(guchar) (c)] & G_ASCII_ALPHA) != 0) |
66 | | |
67 | | #define g_ascii_iscntrl(c) \ |
68 | | ((g_ascii_table[(guchar) (c)] & G_ASCII_CNTRL) != 0) |
69 | | |
70 | | #define g_ascii_isdigit(c) \ |
71 | 484 | ((g_ascii_table[(guchar) (c)] & G_ASCII_DIGIT) != 0) |
72 | | |
73 | | #define g_ascii_isgraph(c) \ |
74 | 0 | ((g_ascii_table[(guchar) (c)] & G_ASCII_GRAPH) != 0) |
75 | | |
76 | | #define g_ascii_islower(c) \ |
77 | 0 | ((g_ascii_table[(guchar) (c)] & G_ASCII_LOWER) != 0) |
78 | | |
79 | | #define g_ascii_isprint(c) \ |
80 | 233M | ((g_ascii_table[(guchar) (c)] & G_ASCII_PRINT) != 0) |
81 | | |
82 | | #define g_ascii_ispunct(c) \ |
83 | | ((g_ascii_table[(guchar) (c)] & G_ASCII_PUNCT) != 0) |
84 | | |
85 | | #define g_ascii_isspace(c) \ |
86 | 184M | ((g_ascii_table[(guchar) (c)] & G_ASCII_SPACE) != 0) |
87 | | |
88 | | #define g_ascii_isupper(c) \ |
89 | 0 | ((g_ascii_table[(guchar) (c)] & G_ASCII_UPPER) != 0) |
90 | | |
91 | | #define g_ascii_isxdigit(c) \ |
92 | 0 | ((g_ascii_table[(guchar) (c)] & G_ASCII_XDIGIT) != 0) |
93 | | |
94 | | GLIB_AVAILABLE_IN_ALL |
95 | | gchar g_ascii_tolower (gchar c) G_GNUC_CONST; |
96 | | GLIB_AVAILABLE_IN_ALL |
97 | | gchar g_ascii_toupper (gchar c) G_GNUC_CONST; |
98 | | |
99 | | GLIB_AVAILABLE_IN_ALL |
100 | | gint g_ascii_digit_value (gchar c) G_GNUC_CONST; |
101 | | GLIB_AVAILABLE_IN_ALL |
102 | | gint g_ascii_xdigit_value (gchar c) G_GNUC_CONST; |
103 | | |
104 | | /* String utility functions that modify a string argument or |
105 | | * return a constant string that must not be freed. |
106 | | */ |
107 | | #define G_STR_DELIMITERS "_-|> <." |
108 | | GLIB_AVAILABLE_IN_ALL |
109 | | gchar* g_strdelimit (gchar *string, |
110 | | const gchar *delimiters, |
111 | | gchar new_delimiter); |
112 | | GLIB_AVAILABLE_IN_ALL |
113 | | gchar* g_strcanon (gchar *string, |
114 | | const gchar *valid_chars, |
115 | | gchar substitutor); |
116 | | GLIB_AVAILABLE_IN_ALL |
117 | | const gchar * g_strerror (gint errnum) G_GNUC_CONST; |
118 | | GLIB_AVAILABLE_IN_ALL |
119 | | const gchar * g_strsignal (gint signum) G_GNUC_CONST; |
120 | | GLIB_AVAILABLE_IN_ALL |
121 | | gchar * g_strreverse (gchar *string); |
122 | | GLIB_AVAILABLE_IN_ALL |
123 | | gsize g_strlcpy (gchar *dest, |
124 | | const gchar *src, |
125 | | gsize dest_size); |
126 | | GLIB_AVAILABLE_IN_ALL |
127 | | gsize g_strlcat (gchar *dest, |
128 | | const gchar *src, |
129 | | gsize dest_size); |
130 | | GLIB_AVAILABLE_IN_ALL |
131 | | gchar * g_strstr_len (const gchar *haystack, |
132 | | gssize haystack_len, |
133 | | const gchar *needle); |
134 | | GLIB_AVAILABLE_IN_ALL |
135 | | gchar * g_strrstr (const gchar *haystack, |
136 | | const gchar *needle); |
137 | | GLIB_AVAILABLE_IN_ALL |
138 | | gchar * g_strrstr_len (const gchar *haystack, |
139 | | gssize haystack_len, |
140 | | const gchar *needle); |
141 | | |
142 | | GLIB_AVAILABLE_IN_ALL |
143 | | gboolean (g_str_has_suffix) (const gchar *str, |
144 | | const gchar *suffix); |
145 | | GLIB_AVAILABLE_IN_ALL |
146 | | gboolean (g_str_has_prefix) (const gchar *str, |
147 | | const gchar *prefix); |
148 | | |
149 | | #if G_GNUC_CHECK_VERSION (2, 0) |
150 | | #ifndef __GTK_DOC_IGNORE__ |
151 | | #ifndef __GI_SCANNER__ |
152 | | |
153 | | /* This macro is defeat a false -Wnonnull warning in GCC. |
154 | | * Without it, it thinks strlen and memcmp may be getting passed NULL |
155 | | * despite the explicit check for NULL right above the calls. |
156 | | */ |
157 | 23.0M | #define _G_STR_NONNULL(x) ((x) + !(x)) |
158 | | |
159 | | #define g_str_has_prefix(STR, PREFIX) \ |
160 | 5.78M | (__builtin_constant_p (PREFIX)? \ |
161 | 5.78M | G_GNUC_EXTENSION ({ \ |
162 | 5.73M | const char * const __str = (STR); \ |
163 | 5.73M | const char * const __prefix = (PREFIX); \ |
164 | 5.73M | gboolean __result = FALSE; \ |
165 | 5.73M | \ |
166 | 5.73M | if G_UNLIKELY (__str == NULL || __prefix == NULL) \ |
167 | 5.73M | __result = (g_str_has_prefix) (__str, __prefix); \ |
168 | 5.73M | else \ |
169 | 5.73M | { \ |
170 | 5.73M | const size_t __str_len = strlen (_G_STR_NONNULL (__str)); \ |
171 | 5.73M | const size_t __prefix_len = strlen (_G_STR_NONNULL (__prefix)); \ |
172 | 5.73M | if (__str_len >= __prefix_len) \ |
173 | 5.73M | __result = memcmp (_G_STR_NONNULL (__str), \ |
174 | 5.70M | _G_STR_NONNULL (__prefix), \ |
175 | 5.70M | __prefix_len) == 0; \ |
176 | 5.73M | } \ |
177 | 5.73M | __result; \ |
178 | 5.73M | }) \ |
179 | 5.78M | : \ |
180 | 5.78M | (g_str_has_prefix) (STR, PREFIX) \ |
181 | 5.78M | ) |
182 | | |
183 | | #define g_str_has_suffix(STR, SUFFIX) \ |
184 | 44.8k | (__builtin_constant_p (SUFFIX)? \ |
185 | 44.8k | G_GNUC_EXTENSION ({ \ |
186 | 44.8k | const char * const __str = (STR); \ |
187 | 44.8k | const char * const __suffix = (SUFFIX); \ |
188 | 44.8k | gboolean __result = FALSE; \ |
189 | 44.8k | \ |
190 | 44.8k | if G_UNLIKELY (__str == NULL || __suffix == NULL) \ |
191 | 44.8k | __result = (g_str_has_suffix) (__str, __suffix); \ |
192 | 44.8k | else \ |
193 | 44.8k | { \ |
194 | 44.8k | const size_t __str_len = strlen (_G_STR_NONNULL (__str)); \ |
195 | 44.8k | const size_t __suffix_len = strlen (_G_STR_NONNULL (__suffix)); \ |
196 | 44.8k | if (__str_len >= __suffix_len) \ |
197 | 44.8k | __result = memcmp (__str + __str_len - __suffix_len, \ |
198 | 32.3k | _G_STR_NONNULL (__suffix), \ |
199 | 32.3k | __suffix_len) == 0; \ |
200 | 44.8k | } \ |
201 | 44.8k | __result; \ |
202 | 44.8k | }) \ |
203 | 44.8k | : \ |
204 | 44.8k | (g_str_has_suffix) (STR, SUFFIX) \ |
205 | 44.8k | ) |
206 | | |
207 | | #endif /* !defined (__GI_SCANNER__) */ |
208 | | #endif /* !defined (__GTK_DOC_IGNORE__) */ |
209 | | #endif /* G_GNUC_CHECK_VERSION (2, 0) */ |
210 | | |
211 | | /* String to/from double conversion functions */ |
212 | | |
213 | | GLIB_AVAILABLE_IN_ALL |
214 | | gdouble g_strtod (const gchar *nptr, |
215 | | gchar **endptr); |
216 | | GLIB_AVAILABLE_IN_ALL |
217 | | gdouble g_ascii_strtod (const gchar *nptr, |
218 | | gchar **endptr); |
219 | | GLIB_AVAILABLE_IN_ALL |
220 | | guint64 g_ascii_strtoull (const gchar *nptr, |
221 | | gchar **endptr, |
222 | | guint base); |
223 | | GLIB_AVAILABLE_IN_ALL |
224 | | gint64 g_ascii_strtoll (const gchar *nptr, |
225 | | gchar **endptr, |
226 | | guint base); |
227 | | /* 29 bytes should enough for all possible values that |
228 | | * g_ascii_dtostr can produce. |
229 | | * Then add 10 for good measure */ |
230 | | #define G_ASCII_DTOSTR_BUF_SIZE (29 + 10) |
231 | | GLIB_AVAILABLE_IN_ALL |
232 | | gchar * g_ascii_dtostr (gchar *buffer, |
233 | | gint buf_len, |
234 | | gdouble d); |
235 | | GLIB_AVAILABLE_IN_ALL |
236 | | gchar * g_ascii_formatd (gchar *buffer, |
237 | | gint buf_len, |
238 | | const gchar *format, |
239 | | gdouble d); |
240 | | |
241 | | /* removes leading spaces */ |
242 | | GLIB_AVAILABLE_IN_ALL |
243 | | gchar* g_strchug (gchar *string); |
244 | | /* removes trailing spaces */ |
245 | | GLIB_AVAILABLE_IN_ALL |
246 | | gchar* g_strchomp (gchar *string); |
247 | | /* removes leading & trailing spaces */ |
248 | 0 | #define g_strstrip( string ) g_strchomp (g_strchug (string)) |
249 | | |
250 | | GLIB_AVAILABLE_IN_ALL |
251 | | gint g_ascii_strcasecmp (const gchar *s1, |
252 | | const gchar *s2); |
253 | | GLIB_AVAILABLE_IN_ALL |
254 | | gint g_ascii_strncasecmp (const gchar *s1, |
255 | | const gchar *s2, |
256 | | gsize n); |
257 | | GLIB_AVAILABLE_IN_ALL |
258 | | gchar* g_ascii_strdown (const gchar *str, |
259 | | gssize len) G_GNUC_MALLOC; |
260 | | GLIB_AVAILABLE_IN_ALL |
261 | | gchar* g_ascii_strup (const gchar *str, |
262 | | gssize len) G_GNUC_MALLOC; |
263 | | |
264 | | GLIB_AVAILABLE_IN_2_40 |
265 | | gboolean g_str_is_ascii (const gchar *str); |
266 | | |
267 | | GLIB_DEPRECATED |
268 | | gint g_strcasecmp (const gchar *s1, |
269 | | const gchar *s2); |
270 | | GLIB_DEPRECATED |
271 | | gint g_strncasecmp (const gchar *s1, |
272 | | const gchar *s2, |
273 | | guint n); |
274 | | GLIB_DEPRECATED |
275 | | gchar* g_strdown (gchar *string); |
276 | | GLIB_DEPRECATED |
277 | | gchar* g_strup (gchar *string); |
278 | | |
279 | | |
280 | | /* String utility functions that return a newly allocated string which |
281 | | * ought to be freed with g_free from the caller at some point. |
282 | | */ |
283 | | GLIB_AVAILABLE_IN_ALL |
284 | | gchar* (g_strdup) (const gchar *str) G_GNUC_MALLOC; |
285 | | GLIB_AVAILABLE_IN_ALL |
286 | | gchar* g_strdup_printf (const gchar *format, |
287 | | ...) G_GNUC_PRINTF (1, 2) G_GNUC_MALLOC; |
288 | | GLIB_AVAILABLE_IN_ALL |
289 | | gchar* g_strdup_vprintf (const gchar *format, |
290 | | va_list args) G_GNUC_PRINTF(1, 0) G_GNUC_MALLOC; |
291 | | GLIB_AVAILABLE_IN_ALL |
292 | | gchar* g_strndup (const gchar *str, |
293 | | gsize n) G_GNUC_MALLOC; |
294 | | GLIB_AVAILABLE_IN_ALL |
295 | | gchar* g_strnfill (gsize length, |
296 | | gchar fill_char) G_GNUC_MALLOC; |
297 | | GLIB_AVAILABLE_IN_ALL |
298 | | gchar* g_strconcat (const gchar *string1, |
299 | | ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; |
300 | | GLIB_AVAILABLE_IN_ALL |
301 | | gchar* g_strjoin (const gchar *separator, |
302 | | ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED; |
303 | | |
304 | | #if G_GNUC_CHECK_VERSION(2, 0) |
305 | | #ifndef __GTK_DOC_IGNORE__ |
306 | | #ifndef __GI_SCANNER__ |
307 | | |
308 | | G_ALWAYS_INLINE static inline char * |
309 | | g_strdup_inline (const char *str) |
310 | 20.2M | { |
311 | 20.2M | if (__builtin_constant_p (!str) && !str) |
312 | 21.5k | return NULL; |
313 | | |
314 | 20.2M | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) |
315 | 5.92k | { |
316 | 5.92k | const size_t len = strlen (str) + 1; |
317 | 5.92k | char *dup_str = (char *) g_malloc (len); |
318 | 5.92k | return (char *) memcpy (dup_str, str, len); |
319 | 5.92k | } |
320 | | |
321 | 20.2M | return g_strdup (str); |
322 | 20.2M | } Unexecuted instantiation: fu-synaptics-cape-struct.c:g_strdup_inline Unexecuted instantiation: fu-synaptics-cape-firmware.c:g_strdup_inline Unexecuted instantiation: fu-synaptics-cape-hid-firmware.c:g_strdup_inline Unexecuted instantiation: fu-synaptics-cape-sngl-firmware.c:g_strdup_inline Unexecuted instantiation: fwupd-bios-setting-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-client-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-codec-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-device-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-enums-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-error-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-jcat-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-json-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-plugin-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-release-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-remote-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-report-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-request-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-security-attr-struct.c:g_strdup_inline Unexecuted instantiation: fwupd-common.c:g_strdup_inline Unexecuted instantiation: fwupd-codec.c:g_strdup_inline fwupd-device.c:g_strdup_inline Line | Count | Source | 310 | 107 | { | 311 | 107 | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 107 | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 107 | return g_strdup (str); | 322 | 107 | } |
Unexecuted instantiation: fwupd-error.c:g_strdup_inline Unexecuted instantiation: fwupd-bios-setting.c:g_strdup_inline Unexecuted instantiation: fwupd-jcat-blob.c:g_strdup_inline Unexecuted instantiation: fwupd-jcat-file.c:g_strdup_inline Unexecuted instantiation: fwupd-jcat-item.c:g_strdup_inline Unexecuted instantiation: fwupd-json-array.c:g_strdup_inline Unexecuted instantiation: fwupd-json-common.c:g_strdup_inline Unexecuted instantiation: fwupd-json-node.c:g_strdup_inline Unexecuted instantiation: fwupd-json-object.c:g_strdup_inline Unexecuted instantiation: fwupd-json-parser.c:g_strdup_inline Unexecuted instantiation: fwupd-security-attr.c:g_strdup_inline Unexecuted instantiation: fwupd-release.c:g_strdup_inline Unexecuted instantiation: fwupd-report.c:g_strdup_inline Unexecuted instantiation: fwupd-request.c:g_strdup_inline Unexecuted instantiation: fwupd-variant.c:g_strdup_inline Unexecuted instantiation: fu-cbor-struct.c:g_strdup_inline Unexecuted instantiation: fu-crc-struct.c:g_strdup_inline Unexecuted instantiation: fu-progress-struct.c:g_strdup_inline Unexecuted instantiation: fu-common-struct.c:g_strdup_inline Unexecuted instantiation: fu-acpi-table-struct.c:g_strdup_inline Unexecuted instantiation: fu-cab-struct.c:g_strdup_inline Unexecuted instantiation: fu-cfi-struct.c:g_strdup_inline Unexecuted instantiation: fu-cfu-struct.c:g_strdup_inline Unexecuted instantiation: fu-cfu-firmware-struct.c:g_strdup_inline Unexecuted instantiation: fu-config-struct.c:g_strdup_inline Unexecuted instantiation: fu-coswid-struct.c:g_strdup_inline Unexecuted instantiation: fu-context-struct.c:g_strdup_inline Unexecuted instantiation: fu-device-struct.c:g_strdup_inline Unexecuted instantiation: fu-dfu-firmware-struct.c:g_strdup_inline Unexecuted instantiation: fu-dpaux-struct.c:g_strdup_inline Unexecuted instantiation: fu-dump-struct.c:g_strdup_inline Unexecuted instantiation: fu-edid-struct.c:g_strdup_inline Unexecuted instantiation: fu-efi-struct.c:g_strdup_inline Unexecuted instantiation: fu-elf-struct.c:g_strdup_inline Unexecuted instantiation: fu-fdt-struct.c:g_strdup_inline Unexecuted instantiation: fu-firmware-struct.c:g_strdup_inline Unexecuted instantiation: fu-fmap-struct.c:g_strdup_inline Unexecuted instantiation: fu-hid-struct.c:g_strdup_inline Unexecuted instantiation: fu-ifd-struct.c:g_strdup_inline Unexecuted instantiation: fu-ifwi-struct.c:g_strdup_inline Unexecuted instantiation: fu-ihex-struct.c:g_strdup_inline Unexecuted instantiation: fu-intel-me-struct.c:g_strdup_inline Unexecuted instantiation: fu-intel-thunderbolt-struct.c:g_strdup_inline Unexecuted instantiation: fu-io-channel-struct.c:g_strdup_inline Unexecuted instantiation: fu-ioctl-struct.c:g_strdup_inline Unexecuted instantiation: fu-heci-struct.c:g_strdup_inline Unexecuted instantiation: fu-msgpack-struct.c:g_strdup_inline Unexecuted instantiation: fu-oprom-struct.c:g_strdup_inline Unexecuted instantiation: fu-path-struct.c:g_strdup_inline Unexecuted instantiation: fu-pefile-struct.c:g_strdup_inline Unexecuted instantiation: fu-pci-struct.c:g_strdup_inline Unexecuted instantiation: fu-processor-struct.c:g_strdup_inline Unexecuted instantiation: fu-protobuf-struct.c:g_strdup_inline Unexecuted instantiation: fu-sbatlevel-section-struct.c:g_strdup_inline Unexecuted instantiation: fu-security-attrs-struct.c:g_strdup_inline Unexecuted instantiation: fu-smbios-struct.c:g_strdup_inline Unexecuted instantiation: fu-srec-struct.c:g_strdup_inline Unexecuted instantiation: fu-tpm-struct.c:g_strdup_inline Unexecuted instantiation: fu-usb-device-ds20-struct.c:g_strdup_inline Unexecuted instantiation: fu-usb-struct.c:g_strdup_inline Unexecuted instantiation: fu-uswid-struct.c:g_strdup_inline Unexecuted instantiation: fu-v4l-struct.c:g_strdup_inline Unexecuted instantiation: fu-zip-struct.c:g_strdup_inline fu-acpi-table.c:g_strdup_inline Line | Count | Source | 310 | 123 | { | 311 | 123 | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 123 | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 123 | return g_strdup (str); | 322 | 123 | } |
Unexecuted instantiation: fu-backend.c:g_strdup_inline Unexecuted instantiation: fu-bios-setting.c:g_strdup_inline Unexecuted instantiation: fu-byte-array.c:g_strdup_inline Unexecuted instantiation: fu-bytes.c:g_strdup_inline Unexecuted instantiation: fu-cab-firmware.c:g_strdup_inline fu-cab-image.c:g_strdup_inline Line | Count | Source | 310 | 14.0k | { | 311 | 14.0k | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 14.0k | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 14.0k | return g_strdup (str); | 322 | 14.0k | } |
fu-cbor-item.c:g_strdup_inline Line | Count | Source | 310 | 37.8k | { | 311 | 37.8k | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 37.8k | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 37.8k | return g_strdup (str); | 322 | 37.8k | } |
Unexecuted instantiation: fu-cbor-common.c:g_strdup_inline Unexecuted instantiation: fu-cfu-offer.c:g_strdup_inline Unexecuted instantiation: fu-cfu-payload.c:g_strdup_inline Unexecuted instantiation: fu-chunk.c:g_strdup_inline Unexecuted instantiation: fu-chunk-array.c:g_strdup_inline Unexecuted instantiation: fu-common.c:g_strdup_inline Unexecuted instantiation: fu-composite-input-stream.c:g_strdup_inline Unexecuted instantiation: fu-compressor-stream.c:g_strdup_inline Unexecuted instantiation: fu-config.c:g_strdup_inline Unexecuted instantiation: fu-context.c:g_strdup_inline Unexecuted instantiation: fu-coswid-common.c:g_strdup_inline Unexecuted instantiation: fu-coswid-firmware.c:g_strdup_inline Unexecuted instantiation: fu-crc.c:g_strdup_inline fu-csv-entry.c:g_strdup_inline Line | Count | Source | 310 | 527k | { | 311 | 527k | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 527k | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 527k | return g_strdup (str); | 322 | 527k | } |
fu-csv-firmware.c:g_strdup_inline Line | Count | Source | 310 | 16.6M | { | 311 | 16.6M | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 16.6M | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 16.6M | return g_strdup (str); | 322 | 16.6M | } |
fu-device.c:g_strdup_inline Line | Count | Source | 310 | 2.44k | { | 311 | 2.44k | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 2.44k | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 2.44k | return g_strdup (str); | 322 | 2.44k | } |
Unexecuted instantiation: fu-device-event.c:g_strdup_inline Unexecuted instantiation: fu-device-locker.c:g_strdup_inline Unexecuted instantiation: fu-dfu-firmware.c:g_strdup_inline Unexecuted instantiation: fu-dfuse-firmware.c:g_strdup_inline Unexecuted instantiation: fu-dummy-efivars.c:g_strdup_inline Unexecuted instantiation: fu-dump.c:g_strdup_inline fu-edid.c:g_strdup_inline Line | Count | Source | 310 | 401 | { | 311 | 401 | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 401 | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 401 | return g_strdup (str); | 322 | 401 | } |
Unexecuted instantiation: fu-efi-common.c:g_strdup_inline Unexecuted instantiation: fu-efi-device-path.c:g_strdup_inline Unexecuted instantiation: fu-efi-device-path-list.c:g_strdup_inline Unexecuted instantiation: fu-efi-file-path-device-path.c:g_strdup_inline Unexecuted instantiation: fu-efi-file.c:g_strdup_inline Unexecuted instantiation: fu-efi-filesystem.c:g_strdup_inline Unexecuted instantiation: fu-efi-section.c:g_strdup_inline Unexecuted instantiation: fu-efi-volume.c:g_strdup_inline Unexecuted instantiation: fu-efi-lz77-decompressor.c:g_strdup_inline Unexecuted instantiation: fu-efi-hard-drive-device-path.c:g_strdup_inline fu-efi-load-option.c:g_strdup_inline Line | Count | Source | 310 | 7.11k | { | 311 | 7.11k | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 7.11k | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 7.11k | return g_strdup (str); | 322 | 7.11k | } |
Unexecuted instantiation: fu-efi-signature.c:g_strdup_inline Unexecuted instantiation: fu-efi-signature-list.c:g_strdup_inline Unexecuted instantiation: fu-efi-vss2-variable-store.c:g_strdup_inline Unexecuted instantiation: fu-efi-vss-auth-variable.c:g_strdup_inline Unexecuted instantiation: fu-efi-ftw-store.c:g_strdup_inline Unexecuted instantiation: fu-efivars.c:g_strdup_inline Unexecuted instantiation: fu-efi-x509-signature.c:g_strdup_inline fu-elf-firmware.c:g_strdup_inline Line | Count | Source | 310 | 4.12k | { | 311 | 4.12k | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 4.12k | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 4.12k | return g_strdup (str); | 322 | 4.12k | } |
fu-fdt-firmware.c:g_strdup_inline Line | Count | Source | 310 | 8.94k | { | 311 | 8.94k | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 8.94k | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 8.94k | return g_strdup (str); | 322 | 8.94k | } |
fu-fdt-image.c:g_strdup_inline Line | Count | Source | 310 | 50.0k | { | 311 | 50.0k | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 50.0k | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 50.0k | return g_strdup (str); | 322 | 50.0k | } |
Unexecuted instantiation: fu-file-input-stream.c:g_strdup_inline fu-firmware.c:g_strdup_inline Line | Count | Source | 310 | 539k | { | 311 | 539k | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 539k | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 539k | return g_strdup (str); | 322 | 539k | } |
Unexecuted instantiation: fu-firmware-common.c:g_strdup_inline Unexecuted instantiation: fu-fit-firmware.c:g_strdup_inline Unexecuted instantiation: fu-fmap-firmware.c:g_strdup_inline Unexecuted instantiation: fu-fuzzer.c:g_strdup_inline Unexecuted instantiation: fu-ginput-stream-adapter.c:g_strdup_inline Unexecuted instantiation: fu-hid-descriptor.c:g_strdup_inline Unexecuted instantiation: fu-hid-report-item.c:g_strdup_inline Unexecuted instantiation: fu-hid-report.c:g_strdup_inline Unexecuted instantiation: fu-hwids.c:g_strdup_inline Unexecuted instantiation: fu-hwids-config.c:g_strdup_inline Unexecuted instantiation: fu-hwids-dmi.c:g_strdup_inline Unexecuted instantiation: fu-hwids-fdt.c:g_strdup_inline Unexecuted instantiation: fu-hwids-kenv.c:g_strdup_inline Unexecuted instantiation: fu-hwids-darwin.c:g_strdup_inline Unexecuted instantiation: fu-hwids-smbios.c:g_strdup_inline Unexecuted instantiation: fu-ifd-bios.c:g_strdup_inline Unexecuted instantiation: fu-ifd-firmware.c:g_strdup_inline Unexecuted instantiation: fu-ifd-image.c:g_strdup_inline Unexecuted instantiation: fu-ifwi-cpd-firmware.c:g_strdup_inline Unexecuted instantiation: fu-ifwi-cpd-image.c:g_strdup_inline Unexecuted instantiation: fu-ifwi-fpt-firmware.c:g_strdup_inline Unexecuted instantiation: fu-ihex-firmware.c:g_strdup_inline fu-input-stream.c:g_strdup_inline Line | Count | Source | 310 | 382 | { | 311 | 382 | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 382 | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 382 | return g_strdup (str); | 322 | 382 | } |
Unexecuted instantiation: fu-memory-input-stream.c:g_strdup_inline Unexecuted instantiation: fu-intel-me-device.c:g_strdup_inline Unexecuted instantiation: fu-intel-thunderbolt-firmware.c:g_strdup_inline Unexecuted instantiation: fu-intel-thunderbolt-nvm.c:g_strdup_inline Unexecuted instantiation: fu-io-channel.c:g_strdup_inline Unexecuted instantiation: fu-ioctl.c:g_strdup_inline Unexecuted instantiation: fu-json-firmware.c:g_strdup_inline Unexecuted instantiation: fu-json-parser.c:g_strdup_inline Unexecuted instantiation: fu-kenv.c:g_strdup_inline Unexecuted instantiation: fu-kernel.c:g_strdup_inline Unexecuted instantiation: fu-kernel-search-path.c:g_strdup_inline Unexecuted instantiation: fu-linear-firmware.c:g_strdup_inline Unexecuted instantiation: fu-lzma-common.c:g_strdup_inline Unexecuted instantiation: fu-mem.c:g_strdup_inline Unexecuted instantiation: fu-oprom-firmware.c:g_strdup_inline Unexecuted instantiation: fu-partial-input-stream.c:g_strdup_inline Unexecuted instantiation: fu-path.c:g_strdup_inline Unexecuted instantiation: fu-path-store.c:g_strdup_inline fu-pefile-firmware.c:g_strdup_inline Line | Count | Source | 310 | 14.4k | { | 311 | 14.4k | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 14.4k | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 5.92k | { | 316 | 5.92k | const size_t len = strlen (str) + 1; | 317 | 5.92k | char *dup_str = (char *) g_malloc (len); | 318 | 5.92k | return (char *) memcpy (dup_str, str, len); | 319 | 5.92k | } | 320 | | | 321 | 8.51k | return g_strdup (str); | 322 | 14.4k | } |
Unexecuted instantiation: fu-protobuf.c:g_strdup_inline Unexecuted instantiation: fu-output-stream.c:g_strdup_inline Unexecuted instantiation: fu-progress.c:g_strdup_inline Unexecuted instantiation: fu-quirks.c:g_strdup_inline Unexecuted instantiation: fu-sbatlevel-section.c:g_strdup_inline Unexecuted instantiation: fu-secure-bytes.c:g_strdup_inline Unexecuted instantiation: fu-security-attr.c:g_strdup_inline Unexecuted instantiation: fu-security-attrs.c:g_strdup_inline Unexecuted instantiation: fu-smbios.c:g_strdup_inline Unexecuted instantiation: fu-srec-firmware.c:g_strdup_inline Unexecuted instantiation: fu-stream-input-stream.c:g_strdup_inline Unexecuted instantiation: fu-string.c:g_strdup_inline Unexecuted instantiation: fu-sum.c:g_strdup_inline Unexecuted instantiation: fu-temporary-directory.c:g_strdup_inline Unexecuted instantiation: fu-tpm-eventlog-item.c:g_strdup_inline Unexecuted instantiation: fu-tpm-eventlog.c:g_strdup_inline Unexecuted instantiation: fu-tpm-eventlog-v1.c:g_strdup_inline Unexecuted instantiation: fu-tpm-eventlog-v2.c:g_strdup_inline Unexecuted instantiation: fu-udev-device.c:g_strdup_inline Unexecuted instantiation: fu-usb-bos-descriptor.c:g_strdup_inline Unexecuted instantiation: fu-usb-config-descriptor.c:g_strdup_inline Unexecuted instantiation: fu-usb-descriptor.c:g_strdup_inline Unexecuted instantiation: fu-usb-device.c:g_strdup_inline Unexecuted instantiation: fu-usb-device-ds20.c:g_strdup_inline Unexecuted instantiation: fu-usb-device-fw-ds20.c:g_strdup_inline Unexecuted instantiation: fu-usb-device-ms-ds20.c:g_strdup_inline Unexecuted instantiation: fu-usb-endpoint.c:g_strdup_inline Unexecuted instantiation: fu-usb-hid-descriptor.c:g_strdup_inline Unexecuted instantiation: fu-usb-interface.c:g_strdup_inline Unexecuted instantiation: fu-uswid-firmware.c:g_strdup_inline Unexecuted instantiation: fu-version-common.c:g_strdup_inline Unexecuted instantiation: fu-volume.c:g_strdup_inline Unexecuted instantiation: fu-volume-locker.c:g_strdup_inline Unexecuted instantiation: fu-x509-certificate.c:g_strdup_inline Unexecuted instantiation: fu-xor.c:g_strdup_inline Unexecuted instantiation: fu-zip-firmware.c:g_strdup_inline Unexecuted instantiation: fu-zip-file.c:g_strdup_inline Unexecuted instantiation: fu-common-linux.c:g_strdup_inline Unexecuted instantiation: fu-darwin-efivars.c:g_strdup_inline Unexecuted instantiation: fu-fuzzer-firmware.c:g_strdup_inline Unexecuted instantiation: xb-builder.c:g_strdup_inline Unexecuted instantiation: xb-builder-fixup.c:g_strdup_inline xb-builder-node.c:g_strdup_inline Line | Count | Source | 310 | 2.04M | { | 311 | 2.04M | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 2.04M | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 2.04M | return g_strdup (str); | 322 | 2.04M | } |
Unexecuted instantiation: xb-builder-source.c:g_strdup_inline Unexecuted instantiation: xb-builder-source-ctx.c:g_strdup_inline Unexecuted instantiation: xb-common.c:g_strdup_inline Unexecuted instantiation: xb-node.c:g_strdup_inline Unexecuted instantiation: xb-node-query.c:g_strdup_inline Unexecuted instantiation: xb-query.c:g_strdup_inline Unexecuted instantiation: xb-query-context.c:g_strdup_inline Unexecuted instantiation: xb-silo.c:g_strdup_inline Unexecuted instantiation: xb-silo-export.c:g_strdup_inline Unexecuted instantiation: xb-silo-query.c:g_strdup_inline Unexecuted instantiation: xb-stack.c:g_strdup_inline Unexecuted instantiation: xb-string.c:g_strdup_inline Unexecuted instantiation: xb-value-bindings.c:g_strdup_inline Unexecuted instantiation: xb-version.c:g_strdup_inline Unexecuted instantiation: xb-zstd-decompressor.c:g_strdup_inline Unexecuted instantiation: xb-lzma-decompressor.c:g_strdup_inline Unexecuted instantiation: xb-machine.c:g_strdup_inline Unexecuted instantiation: xb-opcode.c:g_strdup_inline Unexecuted instantiation: fu-ccgx-struct.c:g_strdup_inline Unexecuted instantiation: fu-ccgx-pure-hid-struct.c:g_strdup_inline Unexecuted instantiation: fu-ccgx-common.c:g_strdup_inline Unexecuted instantiation: fu-ccgx-firmware.c:g_strdup_inline Unexecuted instantiation: fu-genesys-usbhub-struct.c:g_strdup_inline Unexecuted instantiation: fu-genesys-scaler-firmware.c:g_strdup_inline Unexecuted instantiation: fu-genesys-usbhub-firmware.c:g_strdup_inline Unexecuted instantiation: fu-genesys-usbhub-dev-firmware.c:g_strdup_inline Unexecuted instantiation: fu-genesys-usbhub-pd-firmware.c:g_strdup_inline Unexecuted instantiation: fu-genesys-usbhub-codesign-firmware.c:g_strdup_inline Unexecuted instantiation: fu-cros-ec-struct.c:g_strdup_inline Unexecuted instantiation: fu-cros-ec-common.c:g_strdup_inline Unexecuted instantiation: fu-cros-ec-firmware.c:g_strdup_inline Unexecuted instantiation: fu-acpi-phat-struct.c:g_strdup_inline fu-acpi-phat.c:g_strdup_inline Line | Count | Source | 310 | 452 | { | 311 | 452 | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 452 | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 452 | return g_strdup (str); | 322 | 452 | } |
Unexecuted instantiation: fu-acpi-phat-health-record.c:g_strdup_inline Unexecuted instantiation: fu-acpi-phat-version-element.c:g_strdup_inline Unexecuted instantiation: fu-acpi-phat-version-record.c:g_strdup_inline Unexecuted instantiation: fu-pixart-rf-struct.c:g_strdup_inline Unexecuted instantiation: fu-pixart-rf-common.c:g_strdup_inline Unexecuted instantiation: fu-pixart-rf-firmware.c:g_strdup_inline Unexecuted instantiation: fu-ebitdo-struct.c:g_strdup_inline Unexecuted instantiation: fu-ebitdo-firmware.c:g_strdup_inline Unexecuted instantiation: fu-realtek-alc408x-struct.c:g_strdup_inline Unexecuted instantiation: fu-realtek-alc408x-common.c:g_strdup_inline Unexecuted instantiation: fu-realtek-alc408x-firmware.c:g_strdup_inline Unexecuted instantiation: fu-uf2-struct.c:g_strdup_inline Unexecuted instantiation: fu-uf2-firmware.c:g_strdup_inline Unexecuted instantiation: fu-amd-afc-struct.c:g_strdup_inline Unexecuted instantiation: fu-amd-afc-acpi-table.c:g_strdup_inline Unexecuted instantiation: fu-amd-afc-bios-setting.c:g_strdup_inline Unexecuted instantiation: fu-amd-afc-config-entry.c:g_strdup_inline Unexecuted instantiation: fu-amd-afc-config.c:g_strdup_inline Unexecuted instantiation: fu-amd-afc-form.c:g_strdup_inline Unexecuted instantiation: fu-amd-afc-varstore.c:g_strdup_inline Unexecuted instantiation: fu-amd-afc-option.c:g_strdup_inline Unexecuted instantiation: fu-amd-afc-pending.c:g_strdup_inline Unexecuted instantiation: fu-amd-afc-setting.c:g_strdup_inline fu-amd-afc-state.c:g_strdup_inline Line | Count | Source | 310 | 309k | { | 311 | 309k | if (__builtin_constant_p (!str) && !str) | 312 | 21.5k | return NULL; | 313 | | | 314 | 287k | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 287k | return g_strdup (str); | 322 | 287k | } |
Unexecuted instantiation: fu-hughski-colorhug-struct.c:g_strdup_inline Unexecuted instantiation: fu-hughski-colorhug-device.c:g_strdup_inline Unexecuted instantiation: fu-wacom-usb-struct.c:g_strdup_inline Unexecuted instantiation: fu-wacom-usb-firmware.c:g_strdup_inline Unexecuted instantiation: fu-elantp-struct.c:g_strdup_inline Unexecuted instantiation: fu-elantp-firmware.c:g_strdup_inline Unexecuted instantiation: fu-redfish-struct.c:g_strdup_inline Unexecuted instantiation: fu-redfish-common.c:g_strdup_inline fu-redfish-smbios.c:g_strdup_inline Line | Count | Source | 310 | 2.78k | { | 311 | 2.78k | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 2.78k | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 2.78k | return g_strdup (str); | 322 | 2.78k | } |
Unexecuted instantiation: fu-elanfp-struct.c:g_strdup_inline Unexecuted instantiation: fu-elanfp-firmware.c:g_strdup_inline Unexecuted instantiation: fu-synaptics-prometheus-struct.c:g_strdup_inline Unexecuted instantiation: fu-synaptics-prometheus-firmware.c:g_strdup_inline Unexecuted instantiation: fu-synaptics-mst-struct.c:g_strdup_inline Unexecuted instantiation: fu-synaptics-mst-firmware.c:g_strdup_inline Unexecuted instantiation: fu-ccgx-dmc-struct.c:g_strdup_inline Unexecuted instantiation: fu-ccgx-dmc-firmware.c:g_strdup_inline Unexecuted instantiation: fu-synaptics-rmi-struct.c:g_strdup_inline Unexecuted instantiation: fu-synaptics-rmi-common.c:g_strdup_inline Unexecuted instantiation: fu-synaptics-rmi-firmware.c:g_strdup_inline Unexecuted instantiation: fu-bcm57xx-struct.c:g_strdup_inline fu-bcm57xx-common.c:g_strdup_inline Line | Count | Source | 310 | 51 | { | 311 | 51 | if (__builtin_constant_p (!str) && !str) | 312 | 0 | return NULL; | 313 | | | 314 | 51 | if (__builtin_constant_p (!!str) && !!str && __builtin_constant_p (strlen (str))) | 315 | 0 | { | 316 | 0 | const size_t len = strlen (str) + 1; | 317 | 0 | char *dup_str = (char *) g_malloc (len); | 318 | 0 | return (char *) memcpy (dup_str, str, len); | 319 | 0 | } | 320 | | | 321 | 51 | return g_strdup (str); | 322 | 51 | } |
Unexecuted instantiation: fu-bcm57xx-dict-image.c:g_strdup_inline Unexecuted instantiation: fu-bcm57xx-firmware.c:g_strdup_inline Unexecuted instantiation: fu-bcm57xx-stage1-image.c:g_strdup_inline Unexecuted instantiation: fu-bcm57xx-stage2-image.c:g_strdup_inline |
323 | | |
324 | 20.2M | #define g_strdup(x) g_strdup_inline (x) |
325 | | |
326 | | #endif /* !defined (__GI_SCANNER__) */ |
327 | | #endif /* !defined (__GTK_DOC_IGNORE__) */ |
328 | | #endif /* G_GNUC_CHECK_VERSION (2, 0) */ |
329 | | |
330 | | /* Make a copy of a string interpreting C string -style escape |
331 | | * sequences. Inverse of g_strescape. The recognized sequences are \b |
332 | | * \f \n \r \t \\ \" and the octal format. |
333 | | */ |
334 | | GLIB_AVAILABLE_IN_ALL |
335 | | gchar* g_strcompress (const gchar *source) G_GNUC_MALLOC; |
336 | | |
337 | | /* Copy a string escaping nonprintable characters like in C strings. |
338 | | * Inverse of g_strcompress. The exceptions parameter, if non-NULL, points |
339 | | * to a string containing characters that are not to be escaped. |
340 | | * |
341 | | * Deprecated API: gchar* g_strescape (const gchar *source); |
342 | | * Luckily this function wasn't used much, using NULL as second parameter |
343 | | * provides mostly identical semantics. |
344 | | */ |
345 | | GLIB_AVAILABLE_IN_ALL |
346 | | gchar* g_strescape (const gchar *source, |
347 | | const gchar *exceptions) G_GNUC_MALLOC; |
348 | | |
349 | | GLIB_DEPRECATED_IN_2_68_FOR (g_memdup2) |
350 | | gpointer g_memdup (gconstpointer mem, |
351 | | guint byte_size) G_GNUC_ALLOC_SIZE(2); |
352 | | |
353 | | GLIB_AVAILABLE_IN_2_68 |
354 | | gpointer g_memdup2 (gconstpointer mem, |
355 | | gsize byte_size) G_GNUC_ALLOC_SIZE(2); |
356 | | |
357 | | /* NULL terminated string arrays. |
358 | | * g_strsplit(), g_strsplit_set() split up string into max_tokens tokens |
359 | | * at delim and return a newly allocated string array. |
360 | | * g_strjoinv() concatenates all of str_array's strings, sliding in an |
361 | | * optional separator, the returned string is newly allocated. |
362 | | * g_strfreev() frees the array itself and all of its strings. |
363 | | * g_strdupv() copies a NULL-terminated array of strings |
364 | | * g_strv_length() returns the length of a NULL-terminated array of strings |
365 | | */ |
366 | | typedef gchar** GStrv; |
367 | | GLIB_AVAILABLE_IN_ALL |
368 | | gchar** g_strsplit (const gchar *string, |
369 | | const gchar *delimiter, |
370 | | gint max_tokens); |
371 | | GLIB_AVAILABLE_IN_ALL |
372 | | gchar ** g_strsplit_set (const gchar *string, |
373 | | const gchar *delimiters, |
374 | | gint max_tokens); |
375 | | GLIB_AVAILABLE_IN_ALL |
376 | | gchar* g_strjoinv (const gchar *separator, |
377 | | gchar **str_array) G_GNUC_MALLOC; |
378 | | GLIB_AVAILABLE_IN_ALL |
379 | | void g_strfreev (gchar **str_array); |
380 | | GLIB_AVAILABLE_IN_ALL |
381 | | gchar** g_strdupv (gchar **str_array); |
382 | | GLIB_AVAILABLE_IN_ALL |
383 | | guint g_strv_length (gchar **str_array); |
384 | | |
385 | | GLIB_AVAILABLE_IN_ALL |
386 | | gchar* g_stpcpy (gchar *dest, |
387 | | const char *src); |
388 | | |
389 | | GLIB_AVAILABLE_IN_2_40 |
390 | | gchar * g_str_to_ascii (const gchar *str, |
391 | | const gchar *from_locale); |
392 | | |
393 | | GLIB_AVAILABLE_IN_2_40 |
394 | | gchar ** g_str_tokenize_and_fold (const gchar *string, |
395 | | const gchar *translit_locale, |
396 | | gchar ***ascii_alternates); |
397 | | |
398 | | GLIB_AVAILABLE_IN_2_40 |
399 | | gboolean g_str_match_string (const gchar *search_term, |
400 | | const gchar *potential_hit, |
401 | | gboolean accept_alternates); |
402 | | |
403 | | GLIB_AVAILABLE_IN_2_44 |
404 | | gboolean g_strv_contains (const gchar * const *strv, |
405 | | const gchar *str); |
406 | | |
407 | | GLIB_AVAILABLE_IN_2_60 |
408 | | gboolean g_strv_equal (const gchar * const *strv1, |
409 | | const gchar * const *strv2); |
410 | | |
411 | | /* Convenience ASCII string to number API */ |
412 | | |
413 | | /** |
414 | | * GNumberParserError: |
415 | | * @G_NUMBER_PARSER_ERROR_INVALID: string was not a valid number |
416 | | * @G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS: string was a number, but out of bounds |
417 | | * |
418 | | * Error codes returned by functions converting a string to a number. |
419 | | * |
420 | | * Since: 2.54 |
421 | | */ |
422 | | typedef enum |
423 | | { |
424 | | G_NUMBER_PARSER_ERROR_INVALID, |
425 | | G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS, |
426 | | } GNumberParserError; |
427 | | |
428 | | /** |
429 | | * G_NUMBER_PARSER_ERROR: |
430 | | * |
431 | | * Domain for errors returned by functions converting a string to a |
432 | | * number. |
433 | | * |
434 | | * Since: 2.54 |
435 | | */ |
436 | | #define G_NUMBER_PARSER_ERROR (g_number_parser_error_quark ()) |
437 | | |
438 | | GLIB_AVAILABLE_IN_2_54 |
439 | | GQuark g_number_parser_error_quark (void); |
440 | | |
441 | | GLIB_AVAILABLE_IN_2_54 |
442 | | gboolean g_ascii_string_to_signed (const gchar *str, |
443 | | guint base, |
444 | | gint64 min, |
445 | | gint64 max, |
446 | | gint64 *out_num, |
447 | | GError **error); |
448 | | |
449 | | GLIB_AVAILABLE_IN_2_54 |
450 | | gboolean g_ascii_string_to_unsigned (const gchar *str, |
451 | | guint base, |
452 | | guint64 min, |
453 | | guint64 max, |
454 | | guint64 *out_num, |
455 | | GError **error); |
456 | | |
457 | | /** |
458 | | * g_set_str: (skip) |
459 | | * @str_pointer: (inout) (not optional) (nullable): a pointer to either |
460 | | * a string or `NULL` |
461 | | * @new_str: (nullable): a string to assign to @str_pointer |
462 | | * |
463 | | * Updates a pointer to a string to a copy of @new_str and returns whether the |
464 | | * string was changed. |
465 | | * |
466 | | * If @new_str matches the previous string, this function is a no-op. If |
467 | | * @new_str is different, a copy of it will be assigned to @str_pointer and |
468 | | * the previous string pointed to by @str_pointer will be freed with |
469 | | * [func@GLib.free]. |
470 | | * |
471 | | * @str_pointer must not be `NULL`, but can point to a `NULL` value. |
472 | | * |
473 | | * One convenient usage of this function is in implementing property settings: |
474 | | * ```C |
475 | | * void |
476 | | * foo_set_bar (Foo *foo, |
477 | | * const char *new_bar) |
478 | | * { |
479 | | * g_return_if_fail (IS_FOO (foo)); |
480 | | * |
481 | | * if (g_set_str (&foo->bar, new_bar)) |
482 | | * g_object_notify (foo, "bar"); |
483 | | * } |
484 | | * ``` |
485 | | * |
486 | | * Returns: true if the value of @str_pointer changed, false otherwise |
487 | | * |
488 | | * Since: 2.76 |
489 | | */ |
490 | | GLIB_AVAILABLE_STATIC_INLINE_IN_2_76 |
491 | | static inline gboolean |
492 | | g_set_str (char **str_pointer, |
493 | | const char *new_str) |
494 | 738k | { |
495 | 738k | char *copy; |
496 | | |
497 | 738k | if (*str_pointer == new_str || |
498 | 615k | (*str_pointer && new_str && strcmp (*str_pointer, new_str) == 0)) |
499 | 135k | return FALSE; |
500 | | |
501 | 602k | copy = g_strdup (new_str); |
502 | 602k | g_free (*str_pointer); |
503 | 602k | *str_pointer = copy; |
504 | | |
505 | 602k | return TRUE; |
506 | 738k | } Unexecuted instantiation: fu-synaptics-cape-struct.c:g_set_str Unexecuted instantiation: fu-synaptics-cape-firmware.c:g_set_str Unexecuted instantiation: fu-synaptics-cape-hid-firmware.c:g_set_str Unexecuted instantiation: fu-synaptics-cape-sngl-firmware.c:g_set_str Unexecuted instantiation: fwupd-bios-setting-struct.c:g_set_str Unexecuted instantiation: fwupd-client-struct.c:g_set_str Unexecuted instantiation: fwupd-codec-struct.c:g_set_str Unexecuted instantiation: fwupd-device-struct.c:g_set_str Unexecuted instantiation: fwupd-enums-struct.c:g_set_str Unexecuted instantiation: fwupd-error-struct.c:g_set_str Unexecuted instantiation: fwupd-jcat-struct.c:g_set_str Unexecuted instantiation: fwupd-json-struct.c:g_set_str Unexecuted instantiation: fwupd-plugin-struct.c:g_set_str Unexecuted instantiation: fwupd-release-struct.c:g_set_str Unexecuted instantiation: fwupd-remote-struct.c:g_set_str Unexecuted instantiation: fwupd-report-struct.c:g_set_str Unexecuted instantiation: fwupd-request-struct.c:g_set_str Unexecuted instantiation: fwupd-security-attr-struct.c:g_set_str Unexecuted instantiation: fwupd-common.c:g_set_str Unexecuted instantiation: fwupd-codec.c:g_set_str Line | Count | Source | 494 | 832 | { | 495 | 832 | char *copy; | 496 | | | 497 | 832 | if (*str_pointer == new_str || | 498 | 0 | (*str_pointer && new_str && strcmp (*str_pointer, new_str) == 0)) | 499 | 832 | return FALSE; | 500 | | | 501 | 0 | copy = g_strdup (new_str); | 502 | 0 | g_free (*str_pointer); | 503 | 0 | *str_pointer = copy; | 504 | |
| 505 | 0 | return TRUE; | 506 | 832 | } |
Unexecuted instantiation: fwupd-error.c:g_set_str Unexecuted instantiation: fwupd-bios-setting.c:g_set_str Unexecuted instantiation: fwupd-jcat-blob.c:g_set_str Unexecuted instantiation: fwupd-jcat-file.c:g_set_str Unexecuted instantiation: fwupd-jcat-item.c:g_set_str Unexecuted instantiation: fwupd-json-array.c:g_set_str Unexecuted instantiation: fwupd-json-common.c:g_set_str Unexecuted instantiation: fwupd-json-node.c:g_set_str Unexecuted instantiation: fwupd-json-object.c:g_set_str Unexecuted instantiation: fwupd-json-parser.c:g_set_str Unexecuted instantiation: fwupd-security-attr.c:g_set_str Unexecuted instantiation: fwupd-release.c:g_set_str Unexecuted instantiation: fwupd-report.c:g_set_str Unexecuted instantiation: fwupd-request.c:g_set_str Unexecuted instantiation: fwupd-variant.c:g_set_str Unexecuted instantiation: fu-cbor-struct.c:g_set_str Unexecuted instantiation: fu-crc-struct.c:g_set_str Unexecuted instantiation: fu-progress-struct.c:g_set_str Unexecuted instantiation: fu-common-struct.c:g_set_str Unexecuted instantiation: fu-acpi-table-struct.c:g_set_str Unexecuted instantiation: fu-cab-struct.c:g_set_str Unexecuted instantiation: fu-cfi-struct.c:g_set_str Unexecuted instantiation: fu-cfu-struct.c:g_set_str Unexecuted instantiation: fu-cfu-firmware-struct.c:g_set_str Unexecuted instantiation: fu-config-struct.c:g_set_str Unexecuted instantiation: fu-coswid-struct.c:g_set_str Unexecuted instantiation: fu-context-struct.c:g_set_str Unexecuted instantiation: fu-device-struct.c:g_set_str Unexecuted instantiation: fu-dfu-firmware-struct.c:g_set_str Unexecuted instantiation: fu-dpaux-struct.c:g_set_str Unexecuted instantiation: fu-dump-struct.c:g_set_str Unexecuted instantiation: fu-edid-struct.c:g_set_str Unexecuted instantiation: fu-efi-struct.c:g_set_str Unexecuted instantiation: fu-elf-struct.c:g_set_str Unexecuted instantiation: fu-fdt-struct.c:g_set_str Unexecuted instantiation: fu-firmware-struct.c:g_set_str Unexecuted instantiation: fu-fmap-struct.c:g_set_str Unexecuted instantiation: fu-hid-struct.c:g_set_str Unexecuted instantiation: fu-ifd-struct.c:g_set_str Unexecuted instantiation: fu-ifwi-struct.c:g_set_str Unexecuted instantiation: fu-ihex-struct.c:g_set_str Unexecuted instantiation: fu-intel-me-struct.c:g_set_str Unexecuted instantiation: fu-intel-thunderbolt-struct.c:g_set_str Unexecuted instantiation: fu-io-channel-struct.c:g_set_str Unexecuted instantiation: fu-ioctl-struct.c:g_set_str Unexecuted instantiation: fu-heci-struct.c:g_set_str Unexecuted instantiation: fu-msgpack-struct.c:g_set_str Unexecuted instantiation: fu-oprom-struct.c:g_set_str Unexecuted instantiation: fu-path-struct.c:g_set_str Unexecuted instantiation: fu-pefile-struct.c:g_set_str Unexecuted instantiation: fu-pci-struct.c:g_set_str Unexecuted instantiation: fu-processor-struct.c:g_set_str Unexecuted instantiation: fu-protobuf-struct.c:g_set_str Unexecuted instantiation: fu-sbatlevel-section-struct.c:g_set_str Unexecuted instantiation: fu-security-attrs-struct.c:g_set_str Unexecuted instantiation: fu-smbios-struct.c:g_set_str Unexecuted instantiation: fu-srec-struct.c:g_set_str Unexecuted instantiation: fu-tpm-struct.c:g_set_str Unexecuted instantiation: fu-usb-device-ds20-struct.c:g_set_str Unexecuted instantiation: fu-usb-struct.c:g_set_str Unexecuted instantiation: fu-uswid-struct.c:g_set_str Unexecuted instantiation: fu-v4l-struct.c:g_set_str Unexecuted instantiation: fu-zip-struct.c:g_set_str fu-acpi-table.c:g_set_str Line | Count | Source | 494 | 123 | { | 495 | 123 | char *copy; | 496 | | | 497 | 123 | if (*str_pointer == new_str || | 498 | 123 | (*str_pointer && new_str && strcmp (*str_pointer, new_str) == 0)) | 499 | 0 | return FALSE; | 500 | | | 501 | 123 | copy = g_strdup (new_str); | 502 | 123 | g_free (*str_pointer); | 503 | 123 | *str_pointer = copy; | 504 | | | 505 | 123 | return TRUE; | 506 | 123 | } |
Unexecuted instantiation: fu-backend.c:g_set_str Unexecuted instantiation: fu-bios-setting.c:g_set_str Unexecuted instantiation: fu-byte-array.c:g_set_str Unexecuted instantiation: fu-bytes.c:g_set_str Unexecuted instantiation: fu-cab-firmware.c:g_set_str Line | Count | Source | 494 | 14.0k | { | 495 | 14.0k | char *copy; | 496 | | | 497 | 14.0k | if (*str_pointer == new_str || | 498 | 14.0k | (*str_pointer && new_str && strcmp (*str_pointer, new_str) == 0)) | 499 | 0 | return FALSE; | 500 | | | 501 | 14.0k | copy = g_strdup (new_str); | 502 | 14.0k | g_free (*str_pointer); | 503 | 14.0k | *str_pointer = copy; | 504 | | | 505 | 14.0k | return TRUE; | 506 | 14.0k | } |
Unexecuted instantiation: fu-cbor-item.c:g_set_str Unexecuted instantiation: fu-cbor-common.c:g_set_str Unexecuted instantiation: fu-cfu-offer.c:g_set_str Unexecuted instantiation: fu-cfu-payload.c:g_set_str Unexecuted instantiation: fu-chunk.c:g_set_str Unexecuted instantiation: fu-chunk-array.c:g_set_str Unexecuted instantiation: fu-common.c:g_set_str Unexecuted instantiation: fu-composite-input-stream.c:g_set_str Unexecuted instantiation: fu-compressor-stream.c:g_set_str Unexecuted instantiation: fu-config.c:g_set_str Unexecuted instantiation: fu-context.c:g_set_str Unexecuted instantiation: fu-coswid-common.c:g_set_str Unexecuted instantiation: fu-coswid-firmware.c:g_set_str Unexecuted instantiation: fu-crc.c:g_set_str Unexecuted instantiation: fu-csv-entry.c:g_set_str Unexecuted instantiation: fu-csv-firmware.c:g_set_str Unexecuted instantiation: fu-device.c:g_set_str Unexecuted instantiation: fu-device-event.c:g_set_str Unexecuted instantiation: fu-device-locker.c:g_set_str Unexecuted instantiation: fu-dfu-firmware.c:g_set_str Unexecuted instantiation: fu-dfuse-firmware.c:g_set_str Unexecuted instantiation: fu-dummy-efivars.c:g_set_str Unexecuted instantiation: fu-dump.c:g_set_str Line | Count | Source | 494 | 401 | { | 495 | 401 | char *copy; | 496 | | | 497 | 401 | if (*str_pointer == new_str || | 498 | 401 | (*str_pointer && new_str && strcmp (*str_pointer, new_str) == 0)) | 499 | 0 | return FALSE; | 500 | | | 501 | 401 | copy = g_strdup (new_str); | 502 | 401 | g_free (*str_pointer); | 503 | 401 | *str_pointer = copy; | 504 | | | 505 | 401 | return TRUE; | 506 | 401 | } |
Unexecuted instantiation: fu-efi-common.c:g_set_str Unexecuted instantiation: fu-efi-device-path.c:g_set_str Unexecuted instantiation: fu-efi-device-path-list.c:g_set_str Unexecuted instantiation: fu-efi-file-path-device-path.c:g_set_str Unexecuted instantiation: fu-efi-file.c:g_set_str Unexecuted instantiation: fu-efi-filesystem.c:g_set_str Unexecuted instantiation: fu-efi-section.c:g_set_str Unexecuted instantiation: fu-efi-volume.c:g_set_str Unexecuted instantiation: fu-efi-lz77-decompressor.c:g_set_str Unexecuted instantiation: fu-efi-hard-drive-device-path.c:g_set_str Unexecuted instantiation: fu-efi-load-option.c:g_set_str Unexecuted instantiation: fu-efi-signature.c:g_set_str Unexecuted instantiation: fu-efi-signature-list.c:g_set_str Unexecuted instantiation: fu-efi-vss2-variable-store.c:g_set_str Unexecuted instantiation: fu-efi-vss-auth-variable.c:g_set_str Unexecuted instantiation: fu-efi-ftw-store.c:g_set_str Unexecuted instantiation: fu-efivars.c:g_set_str Unexecuted instantiation: fu-efi-x509-signature.c:g_set_str Unexecuted instantiation: fu-elf-firmware.c:g_set_str Unexecuted instantiation: fu-fdt-firmware.c:g_set_str Unexecuted instantiation: fu-fdt-image.c:g_set_str Unexecuted instantiation: fu-file-input-stream.c:g_set_str Line | Count | Source | 494 | 669k | { | 495 | 669k | char *copy; | 496 | | | 497 | 669k | if (*str_pointer == new_str || | 498 | 551k | (*str_pointer && new_str && strcmp (*str_pointer, new_str) == 0)) | 499 | 130k | return FALSE; | 500 | | | 501 | 539k | copy = g_strdup (new_str); | 502 | 539k | g_free (*str_pointer); | 503 | 539k | *str_pointer = copy; | 504 | | | 505 | 539k | return TRUE; | 506 | 669k | } |
Unexecuted instantiation: fu-firmware-common.c:g_set_str Unexecuted instantiation: fu-fit-firmware.c:g_set_str Unexecuted instantiation: fu-fmap-firmware.c:g_set_str Unexecuted instantiation: fu-fuzzer.c:g_set_str Unexecuted instantiation: fu-ginput-stream-adapter.c:g_set_str Unexecuted instantiation: fu-hid-descriptor.c:g_set_str Unexecuted instantiation: fu-hid-report-item.c:g_set_str Unexecuted instantiation: fu-hid-report.c:g_set_str Unexecuted instantiation: fu-hwids.c:g_set_str Unexecuted instantiation: fu-hwids-config.c:g_set_str Unexecuted instantiation: fu-hwids-dmi.c:g_set_str Unexecuted instantiation: fu-hwids-fdt.c:g_set_str Unexecuted instantiation: fu-hwids-kenv.c:g_set_str Unexecuted instantiation: fu-hwids-darwin.c:g_set_str Unexecuted instantiation: fu-hwids-smbios.c:g_set_str Unexecuted instantiation: fu-ifd-bios.c:g_set_str Unexecuted instantiation: fu-ifd-firmware.c:g_set_str Unexecuted instantiation: fu-ifd-image.c:g_set_str Unexecuted instantiation: fu-ifwi-cpd-firmware.c:g_set_str Unexecuted instantiation: fu-ifwi-cpd-image.c:g_set_str Unexecuted instantiation: fu-ifwi-fpt-firmware.c:g_set_str Unexecuted instantiation: fu-ihex-firmware.c:g_set_str Unexecuted instantiation: fu-input-stream.c:g_set_str Unexecuted instantiation: fu-memory-input-stream.c:g_set_str Unexecuted instantiation: fu-intel-me-device.c:g_set_str Unexecuted instantiation: fu-intel-thunderbolt-firmware.c:g_set_str Unexecuted instantiation: fu-intel-thunderbolt-nvm.c:g_set_str Unexecuted instantiation: fu-io-channel.c:g_set_str Unexecuted instantiation: fu-ioctl.c:g_set_str Unexecuted instantiation: fu-json-firmware.c:g_set_str Unexecuted instantiation: fu-json-parser.c:g_set_str Unexecuted instantiation: fu-kenv.c:g_set_str Unexecuted instantiation: fu-kernel.c:g_set_str Unexecuted instantiation: fu-kernel-search-path.c:g_set_str Unexecuted instantiation: fu-linear-firmware.c:g_set_str Unexecuted instantiation: fu-lzma-common.c:g_set_str Unexecuted instantiation: fu-mem.c:g_set_str Unexecuted instantiation: fu-oprom-firmware.c:g_set_str Unexecuted instantiation: fu-partial-input-stream.c:g_set_str Unexecuted instantiation: fu-path.c:g_set_str Unexecuted instantiation: fu-path-store.c:g_set_str Unexecuted instantiation: fu-pefile-firmware.c:g_set_str Unexecuted instantiation: fu-protobuf.c:g_set_str Unexecuted instantiation: fu-output-stream.c:g_set_str Unexecuted instantiation: fu-progress.c:g_set_str Unexecuted instantiation: fu-quirks.c:g_set_str Unexecuted instantiation: fu-sbatlevel-section.c:g_set_str Unexecuted instantiation: fu-secure-bytes.c:g_set_str Unexecuted instantiation: fu-security-attr.c:g_set_str Unexecuted instantiation: fu-security-attrs.c:g_set_str Unexecuted instantiation: fu-smbios.c:g_set_str Unexecuted instantiation: fu-srec-firmware.c:g_set_str Unexecuted instantiation: fu-stream-input-stream.c:g_set_str Unexecuted instantiation: fu-string.c:g_set_str Unexecuted instantiation: fu-sum.c:g_set_str Unexecuted instantiation: fu-temporary-directory.c:g_set_str Unexecuted instantiation: fu-tpm-eventlog-item.c:g_set_str Unexecuted instantiation: fu-tpm-eventlog.c:g_set_str Unexecuted instantiation: fu-tpm-eventlog-v1.c:g_set_str Unexecuted instantiation: fu-tpm-eventlog-v2.c:g_set_str Unexecuted instantiation: fu-udev-device.c:g_set_str Unexecuted instantiation: fu-usb-bos-descriptor.c:g_set_str Unexecuted instantiation: fu-usb-config-descriptor.c:g_set_str Unexecuted instantiation: fu-usb-descriptor.c:g_set_str Unexecuted instantiation: fu-usb-device.c:g_set_str Unexecuted instantiation: fu-usb-device-ds20.c:g_set_str Unexecuted instantiation: fu-usb-device-fw-ds20.c:g_set_str Unexecuted instantiation: fu-usb-device-ms-ds20.c:g_set_str Unexecuted instantiation: fu-usb-endpoint.c:g_set_str Unexecuted instantiation: fu-usb-hid-descriptor.c:g_set_str Unexecuted instantiation: fu-usb-interface.c:g_set_str Unexecuted instantiation: fu-uswid-firmware.c:g_set_str Unexecuted instantiation: fu-version-common.c:g_set_str Unexecuted instantiation: fu-volume.c:g_set_str Unexecuted instantiation: fu-volume-locker.c:g_set_str Unexecuted instantiation: fu-x509-certificate.c:g_set_str Unexecuted instantiation: fu-xor.c:g_set_str Unexecuted instantiation: fu-zip-firmware.c:g_set_str Unexecuted instantiation: fu-zip-file.c:g_set_str Unexecuted instantiation: fu-common-linux.c:g_set_str Unexecuted instantiation: fu-darwin-efivars.c:g_set_str Unexecuted instantiation: fu-fuzzer-firmware.c:g_set_str Unexecuted instantiation: xb-builder.c:g_set_str Unexecuted instantiation: xb-builder-fixup.c:g_set_str Unexecuted instantiation: xb-builder-node.c:g_set_str Unexecuted instantiation: xb-builder-source.c:g_set_str Unexecuted instantiation: xb-builder-source-ctx.c:g_set_str Unexecuted instantiation: xb-common.c:g_set_str Unexecuted instantiation: xb-node.c:g_set_str Unexecuted instantiation: xb-node-query.c:g_set_str Unexecuted instantiation: xb-query.c:g_set_str Unexecuted instantiation: xb-query-context.c:g_set_str Unexecuted instantiation: xb-silo.c:g_set_str Unexecuted instantiation: xb-silo-export.c:g_set_str Unexecuted instantiation: xb-silo-query.c:g_set_str Unexecuted instantiation: xb-stack.c:g_set_str Unexecuted instantiation: xb-string.c:g_set_str Unexecuted instantiation: xb-value-bindings.c:g_set_str Unexecuted instantiation: xb-version.c:g_set_str Unexecuted instantiation: xb-zstd-decompressor.c:g_set_str Unexecuted instantiation: xb-lzma-decompressor.c:g_set_str Unexecuted instantiation: xb-machine.c:g_set_str Unexecuted instantiation: xb-opcode.c:g_set_str Unexecuted instantiation: fu-ccgx-struct.c:g_set_str Unexecuted instantiation: fu-ccgx-pure-hid-struct.c:g_set_str Unexecuted instantiation: fu-ccgx-common.c:g_set_str Unexecuted instantiation: fu-ccgx-firmware.c:g_set_str Unexecuted instantiation: fu-genesys-usbhub-struct.c:g_set_str Unexecuted instantiation: fu-genesys-scaler-firmware.c:g_set_str Unexecuted instantiation: fu-genesys-usbhub-firmware.c:g_set_str Unexecuted instantiation: fu-genesys-usbhub-dev-firmware.c:g_set_str Unexecuted instantiation: fu-genesys-usbhub-pd-firmware.c:g_set_str Unexecuted instantiation: fu-genesys-usbhub-codesign-firmware.c:g_set_str Unexecuted instantiation: fu-cros-ec-struct.c:g_set_str Unexecuted instantiation: fu-cros-ec-common.c:g_set_str Unexecuted instantiation: fu-cros-ec-firmware.c:g_set_str Unexecuted instantiation: fu-acpi-phat-struct.c:g_set_str Line | Count | Source | 494 | 875 | { | 495 | 875 | char *copy; | 496 | | | 497 | 875 | if (*str_pointer == new_str || | 498 | 452 | (*str_pointer && new_str && strcmp (*str_pointer, new_str) == 0)) | 499 | 423 | return FALSE; | 500 | | | 501 | 452 | copy = g_strdup (new_str); | 502 | 452 | g_free (*str_pointer); | 503 | 452 | *str_pointer = copy; | 504 | | | 505 | 452 | return TRUE; | 506 | 875 | } |
Unexecuted instantiation: fu-acpi-phat-health-record.c:g_set_str Unexecuted instantiation: fu-acpi-phat-version-element.c:g_set_str Unexecuted instantiation: fu-acpi-phat-version-record.c:g_set_str Unexecuted instantiation: fu-pixart-rf-struct.c:g_set_str Unexecuted instantiation: fu-pixart-rf-common.c:g_set_str Unexecuted instantiation: fu-pixart-rf-firmware.c:g_set_str Unexecuted instantiation: fu-ebitdo-struct.c:g_set_str Unexecuted instantiation: fu-ebitdo-firmware.c:g_set_str Unexecuted instantiation: fu-realtek-alc408x-struct.c:g_set_str Unexecuted instantiation: fu-realtek-alc408x-common.c:g_set_str Unexecuted instantiation: fu-realtek-alc408x-firmware.c:g_set_str Unexecuted instantiation: fu-uf2-struct.c:g_set_str Unexecuted instantiation: fu-uf2-firmware.c:g_set_str Unexecuted instantiation: fu-amd-afc-struct.c:g_set_str Unexecuted instantiation: fu-amd-afc-acpi-table.c:g_set_str Unexecuted instantiation: fu-amd-afc-bios-setting.c:g_set_str Unexecuted instantiation: fu-amd-afc-config-entry.c:g_set_str Unexecuted instantiation: fu-amd-afc-config.c:g_set_str Unexecuted instantiation: fu-amd-afc-form.c:g_set_str Unexecuted instantiation: fu-amd-afc-varstore.c:g_set_str Unexecuted instantiation: fu-amd-afc-option.c:g_set_str Unexecuted instantiation: fu-amd-afc-pending.c:g_set_str Unexecuted instantiation: fu-amd-afc-setting.c:g_set_str fu-amd-afc-state.c:g_set_str Line | Count | Source | 494 | 48.2k | { | 495 | 48.2k | char *copy; | 496 | | | 497 | 48.2k | if (*str_pointer == new_str || | 498 | 45.1k | (*str_pointer && new_str && strcmp (*str_pointer, new_str) == 0)) | 499 | 3.19k | return FALSE; | 500 | | | 501 | 45.0k | copy = g_strdup (new_str); | 502 | 45.0k | g_free (*str_pointer); | 503 | 45.0k | *str_pointer = copy; | 504 | | | 505 | 45.0k | return TRUE; | 506 | 48.2k | } |
Unexecuted instantiation: fu-hughski-colorhug-struct.c:g_set_str Unexecuted instantiation: fu-hughski-colorhug-device.c:g_set_str Unexecuted instantiation: fu-wacom-usb-struct.c:g_set_str Unexecuted instantiation: fu-wacom-usb-firmware.c:g_set_str Unexecuted instantiation: fu-elantp-struct.c:g_set_str Unexecuted instantiation: fu-elantp-firmware.c:g_set_str Unexecuted instantiation: fu-redfish-struct.c:g_set_str Unexecuted instantiation: fu-redfish-common.c:g_set_str fu-redfish-smbios.c:g_set_str Line | Count | Source | 494 | 4.09k | { | 495 | 4.09k | char *copy; | 496 | | | 497 | 4.09k | if (*str_pointer == new_str || | 498 | 4.09k | (*str_pointer && new_str && strcmp (*str_pointer, new_str) == 0)) | 499 | 1.30k | return FALSE; | 500 | | | 501 | 2.78k | copy = g_strdup (new_str); | 502 | 2.78k | g_free (*str_pointer); | 503 | 2.78k | *str_pointer = copy; | 504 | | | 505 | 2.78k | return TRUE; | 506 | 4.09k | } |
Unexecuted instantiation: fu-elanfp-struct.c:g_set_str Unexecuted instantiation: fu-elanfp-firmware.c:g_set_str Unexecuted instantiation: fu-synaptics-prometheus-struct.c:g_set_str Unexecuted instantiation: fu-synaptics-prometheus-firmware.c:g_set_str Unexecuted instantiation: fu-synaptics-mst-struct.c:g_set_str Unexecuted instantiation: fu-synaptics-mst-firmware.c:g_set_str Unexecuted instantiation: fu-ccgx-dmc-struct.c:g_set_str Unexecuted instantiation: fu-ccgx-dmc-firmware.c:g_set_str Unexecuted instantiation: fu-synaptics-rmi-struct.c:g_set_str Unexecuted instantiation: fu-synaptics-rmi-common.c:g_set_str Unexecuted instantiation: fu-synaptics-rmi-firmware.c:g_set_str Unexecuted instantiation: fu-bcm57xx-struct.c:g_set_str Unexecuted instantiation: fu-bcm57xx-common.c:g_set_str Unexecuted instantiation: fu-bcm57xx-dict-image.c:g_set_str Unexecuted instantiation: fu-bcm57xx-firmware.c:g_set_str Unexecuted instantiation: fu-bcm57xx-stage1-image.c:g_set_str Unexecuted instantiation: fu-bcm57xx-stage2-image.c:g_set_str |
507 | | |
508 | | G_END_DECLS |
509 | | |
510 | | #endif /* __G_STRFUNCS_H__ */ |