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

Function add_to_res

dpdk/lib/cmdline/cmdline_parse_num.c:53–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51};
52
53static inline int
54add_to_res(unsigned int c, uint64_t *res, unsigned int base)
55{
56 /* overflow */
57 if ((UINT64_MAX - c) / base < *res)
58 return -1;
59
60 *res = (uint64_t) (*res * base + c);
61 return 0;
62}
63
64static int
65check_res_size(struct cmdline_token_num_data *nd, unsigned ressize)

Callers 1

cmdline_parse_numFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected