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

Function parser_dvpt_interim

dpdk/examples/fips_validation/fips_validation_ccm.c:49–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47#define AAD_JSON_STR "aad"
48
49static int
50parser_dvpt_interim(const char *key, char *src, struct fips_val *val)
51{
52 char *tmp, c, value[10];
53 char num_pattern[] = "0123456789";
54 int i = 0;
55
56 memset(value, 0, 10);
57
58 tmp = strstr(src, key);
59 if (!tmp)
60 return -1;
61
62 tmp += strlen(key);
63
64 c = tmp[0];
65
66 while (strchr(num_pattern, c) && i < 10) {
67 value[i++] = c;
68 c = tmp[i];
69 }
70
71 return parser_read_uint32_val("", value, val);
72}
73
74static int
75parse_dvpt_ct_hex_str(const char *key, char *src, struct fips_val *val)

Callers

nothing calls this directly

Calls 4

memsetFunction · 0.85
strstrFunction · 0.85
strchrFunction · 0.85
parser_read_uint32_valFunction · 0.85

Tested by

no test coverage detected