MCPcopy Create free account
hub / github.com/coreboot/coreboot / strip

Function strip

util/kconfig/conf.c:59–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59static void strip(char *str)
60{
61 char *p = str;
62 int l;
63
64 while ((isspace(*p)))
65 p++;
66 l = strlen(p);
67 if (p != str)
68 memmove(str, p, l + 1);
69 if (!l)
70 return;
71 p = str + l - 1;
72 while ((isspace(*p)))
73 *p-- = 0;
74}
75
76/* Helper function to facilitate fgets() by Jean Sacren. */
77static void xfgets(char *str, int size, FILE *in)

Callers 2

conf_symFunction · 0.85
conf_choiceFunction · 0.85

Calls 3

strlenFunction · 0.85
isspaceFunction · 0.50
memmoveFunction · 0.50

Tested by

no test coverage detected