MCPcopy Create free account
hub / github.com/F-Stack/f-stack / login_getpath

Function login_getpath

tools/libutil/login_cap.c:402–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400 */
401
402const char *
403login_getpath(login_cap_t *lc, const char *cap, const char *error)
404{
405 const char *str;
406 char *ptr;
407 int count;
408
409 str = login_getcapstr(lc, cap, NULL, NULL);
410 if (str == NULL)
411 return error;
412 ptr = __DECONST(char *, str); /* XXXX Yes, very dodgy */
413 while (*ptr) {
414 count = strcspn(ptr, ", \t");
415 ptr += count;
416 if (*ptr)
417 *ptr++ = ':';
418 }
419 return str;
420}
421
422
423static int

Callers 1

setclassenvironmentFunction · 0.85

Calls 2

login_getcapstrFunction · 0.85
strcspnFunction · 0.85

Tested by

no test coverage detected