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

Function parse_node_num

dpdk/examples/server_node_efd/efd_node/node.c:71–86  ·  view source on GitHub ↗

* Convert the node id number from a string to an int. */

Source from the content-addressed store, hash-verified

69 * Convert the node id number from a string to an int.
70 */
71static int
72parse_node_num(const char *node)
73{
74 char *end = NULL;
75 unsigned long temp;
76
77 if (node == NULL || *node == '\0')
78 return -1;
79
80 temp = strtoul(node, &end, 10);
81 if (end == NULL || *end != '\0')
82 return -1;
83
84 node_id = (uint8_t)temp;
85 return 0;
86}
87
88/*
89 * Parse the application arguments to the node app.

Callers 1

parse_app_argsFunction · 0.85

Calls 1

strtoulFunction · 0.85

Tested by

no test coverage detected