MCPcopy Create free account
hub / github.com/containers/bubblewrap / strconcat3

Function strconcat3

utils.c:329–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329char *
330strconcat3 (const char *s1,
331 const char *s2,
332 const char *s3)
333{
334 size_t len = 0;
335 char *res;
336
337 if (s1)
338 len += strlen (s1);
339 if (s2)
340 len += strlen (s2);
341 if (s3)
342 len += strlen (s3);
343
344 res = xmalloc (len + 1);
345 *res = 0;
346 if (s1)
347 strcat (res, s1);
348 if (s2)
349 strcat (res, s2);
350 if (s3)
351 strcat (res, s3);
352
353 return res;
354}
355
356char *
357xasprintf (const char *format,

Callers 2

setup_newrootFunction · 0.85
test_strconcat3Function · 0.85

Calls 1

xmallocFunction · 0.85

Tested by 1

test_strconcat3Function · 0.68