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

Function valid_opt

util/cbfstool/cse_serger.c:891–903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

889};
890
891static bool valid_opt(size_t i, int c)
892{
893 /* Check if it is one of the optstrings supported by the command. */
894 if (strchr(commands[i].optstring, c))
895 return true;
896
897 /*
898 * Check if it is one of the non-ASCII characters. Currently, the
899 * non-ASCII characters are only checked against the valid list
900 * irrespective of the command.
901 */
902 return c >= LONGOPT_START && c < LONGOPT_END;
903}
904
905static void usage(const char *name)
906{

Callers 1

mainFunction · 0.70

Calls 1

strchrFunction · 0.50

Tested by

no test coverage detected