MCPcopy Create free account
hub / github.com/coreutils/coreutils / make_id_equals_comment

Function make_id_equals_comment

src/who.c:432–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432static char *
433make_id_equals_comment (STRUCT_UTMP const *utmp_ent)
434{
435 char const *id = UT_ID (utmp_ent);
436 idx_t idlen = strlen (id);
437 char const *prefix = _("id=");
438 idx_t prefixlen = strlen (prefix);
439 char *comment = xmalloc (prefixlen + idlen + 1);
440 char *p = mempcpy (comment, prefix, prefixlen);
441 p = mempcpy (p, id, idlen);
442 *p = '\0';
443 return comment;
444}
445
446static void
447print_deadprocs (STRUCT_UTMP const *utmp_ent)

Callers 3

print_deadprocsFunction · 0.85
print_loginFunction · 0.85
print_initspawnFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected